Set a date field to today's date
Abstract
This code snippet sets a date field to today's dateÂ
Logic
Pass today's date
SnippetÂ
{{ now }}
Context
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
{{ 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
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