Forums

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

date time format with automation for Jira

Deleted user June 13, 2021

I would like to present the Jira user with an absolute time value that reports the difference between the creation date and the current date when an issue goes from to do to in progress.

I'm currently using this rule, but as you can see, the result is a date and time.

I would like to output the exact hours (hours and minutes) or a format like weeks, hours, minutes.

I can't find any information on how to format the dates in the result with automation for Jira.

Can you help me?

 

Schermata 2021-06-14 alle 08.44.46.pngSchermata 2021-06-14 alle 08.47.25.png

1 answer

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2021

Hi @[deleted] 

Please look at this documentation to learn for available formats for the date diff() function:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-date-and-time-functions/

If none of those meet your needs, you will probably need to do this manually with the math operations and format() function:

https://support.atlassian.com/jira-software-cloud/docs/smart-values-math-expressions/


Best regards,

Bill

Sam Harding
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 14, 2021

This is the correct answer, a smart value using diff and format will do the trick:

{{now.diff(issue.created).format("toHours")}}

Like Deleted user likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events