Forums

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

Comparing time between status transition and issue created

Simon Geer
Contributor
January 5, 2020

I am trying to using Automation to compute the time between when an issue was created to when it has been transitioned to a specific workflow status.

When I attempt to get the value displayed in prettyPrint:{{setTimeZone("Australia/Brisbane")}} {{now.diff(issue.created).prettyPrint}}

I get this error:
Error rendering smart-values when executing this rule:Failed to get value for now.diff(issue.created).prettyPrint: {{setTimeZone("Australia/Brisbane")}} {{now.diff(issue.created).prettyPrint}}

I then tried getting value displayed in minutes:
{{setTimeZone("Australia/Brisbane")}} {{now.diff(issue.created).minutes}}

Although this kinda works, the value is correct but shows as a minus, e.g. -34. As it has been 34 minutes between now and the issue being created, I would've expected it to show as 34.

Any ideas around why:

1) prettyPrint doesn't work?

2) My minutes value is being shown as a minus?

Thanks!

 

1 answer

0 votes
Zoryana Bohutska _SaaSJet_
Atlassian Partner
January 10, 2020

Hi @Simon Geer 

As other alternative solution, you can try app Time Between Statuses which automatically calculates data you need. It will let you set the start, stop and pause timer preferences. Also, with this instrument, you can monitor the visual colour tagging on the issues where the time limits are passed.

Best regard

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events