I have two date fields - Target Date and Due Date. I want to create an automation so that any issues where Due Date is after Target Date are flagged into a custom field.
Based upon some previous community posts, I've been testing out isAfter and date diff with smart values, using advanced compare, but haven't been successful yet.
Using advanced compare in Automation, I've used
{{issue.Due Date.isAfter(issue.Target End)}}
equals
true
However, I haven't been able to get this comparison to return true yet.
Any suggestions?
Hi Jon,
What I would do is create a custom number field where the difference between the two dates are stored. Then you can run a filter where that value is check to be greater than zero (or another number if you like.
So it would be a rule based on one of the fields being updated.
Then have a new action for Edit issue and select the new number custom field.
In the Set value area put in something like: {{issue.Due Date.diff(issue.Target Date).days}}
On this page
https://support.atlassian.com/jira-software-cloud/docs/smart-values-general/
I found that the Due Date field is referenced using this
issue.duedate
Have you tried another date function, like
{{[date1].dif([date2]).[unit]}}
to confirm that the system can calculate that there is a difference between the dates?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.