The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation: Difference date/time between NOW and ISSUE.UPDATED

Michael Davison
Contributor
August 17, 2021

Hello - I'm trying to set up an automations rule that checks for the difference between the date time NOW, and when issues were last updated (with corrections for time zone).

If the time difference meets a certain threshold (3 business days) then the conditions match. When the conditions match, send an email. When the email is sent, it would also log an update in the issue field, resetting the "difference" clock. This would be a scheduled automation daily.

There are 2 areas where I am confused: 

1) What would the advanced compare condition in the automation look like? I have set it up this way, however I am not sure if this is correct: 

{{now.diff(issue.updated).convertToTimeZone("America/New_York").businessDays}}

is less than -3

Screen Shot 2021-08-17 at 10.01.50 AM.png

 

2) When I save the automation as a Scheduled Automation, I get the following error: 

Screen Shot 2021-08-17 at 10.11.32 AM.png

 

What do I put in the JQL query below the Schedule, as shown below? 

Screen Shot 2021-08-17 at 10.07.31 AM.png

 

I assumed it would be something like:

{{now.diff(issue.updated).convertToTimeZone("America/New_York").businessDays}} < -3

But that is returning an error.

 

Any assistance on this would be much appreciated!!! Thank you.

 

 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Michael Davison
Contributor
August 17, 2021

I have made some adjustments and I think I have resolved the problem:

 

1) I updated the first value in the Advanced compare condition to

{{now.diff(issue.updated).businessDays}}

2) I removed the business days check from the JQL query located on the Scheduled automation, and instead updated it to just look for issues with a Status of "Waiting for Approval" as so: 

Status = "Waiting for Approval"

...as this only pulls in the issues that I want to put through my advanced compare condition in 1).

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events