I have automation that sets the due date for an issue based on its issue type at the time it moves to "In Progress" ( {{now.plusBusinessDays(5)}}). I then have an automation that compares the resolution date to the due date and puts a "past due" label on the issue when it transitions to done if the due date is less than the resolution date.
The problem is based on time stamps some issues are being labeled as "past due" because they were moved to "In Progress" in the morning but resolved in the afternoon of the due date.
This of course creates manual intervention defeating the intended purpose of these automations.
Hi @Michael Smith,
Welcome to Atlassian Community!
You could manipulate the two dates to see if there is a difference based on number of days, like this:
{{issue.due.diff(issue.resolved).days}}
@Mikael Sandberg Thank you for quickly offering a solution, I apologize for my ignorance but I want to make sure I understand how this is working.
It appears that it is performing a comparison of the dates but telling it to ignore the time stamp. Doesn't this mean I would need to "print" that value somewhere and then check if the value is greater than 0 label that issue past due?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correct, the diff ignores that time and will only return the diff in days. And no, you would not need to "print" the diff, you can use it as is in an advanced compare if condition like this:
The rule will not go past this compare unless the compare is true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you so much for the explanation! This will work great I have no doubt.
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.