Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Abstract

This code snippet sets a date field to today's date 

...

The output of the code snippet is a Moment.js date object which you could use to:

  • Set a Date/Date-time picker field - Eg: Set the Due date to today in
    • one of the Set Field Value post-functions
    • one of the Transition issue post-functions on the transition screen, if any
    • in the Create issue post-function under Set fields of new issue section

  • Conditionally execute a post-function or Unlink issues - Eg: Estimated delivery date is less than today

    Code Block
    languagejs
    linenumberstrue
    {{ issue.fields["Estimated Delivery Date"] < now }}


  • Notify the customer when the issue has been rejected as invalid through the
    • Comment in one of the Comment issue post-functions

    • Subject/HTML body/Text body of Email issue post-function

      Code Block
      languagejs
      linenumberstrue
      Your issue has been rejected on {{ now | date('dddd, MMMM Do YYYY') }} since it is invalid.


  • Write a JQL search expression in Link issues to current issue post-function. Eg: Link issues which have been created since yesterday

    Code Block
    languagejs
    linenumberstrue
    created >= {{ now | date('subtract' , 1 , 'days') }}


...

Filter by label (Content by label)
showLabelsfalse
max5
spacesKB
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "jmwe-nunjucks" and type = "page" and space = "KBJMWEC"
labelsjmwe-nunjucks jmwe-cloud

...