Forums

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

How can I list the difference between the created date and resolution date as days, hours, minutes?

Heather Thomas November 30, 2021

I am creating automation in Jira (cloud) on a company-managed software to find the time to resolution.  I need to list in a field on the issue how long it takes for the issue to go from created to resolved.  The result needs to be listed in Days, Hours, Minutes. 

Here is what I have tried (I can get a total number of hours or a total number of days but not a combination of the 3 that I need).

{{issue.created.diff(issue.resolutiondate).hours}}

I have tried using the following custom field types: Text Field (single line), Date Time Picker, Number Field. 

I read something about prettyPrint will display the difference in words but I can't get it to work. 

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
November 30, 2021

Hello @Heather Thomas 

Welcome to the community.

What have you tried for prettyPrint? From what I've read (I haven't actually tested this), the following should work

{{issue.created.diff(issue.resolutiondate).prettyPrint}}
Heather Thomas December 1, 2021

Thank you. That did work. I was making the mistake of using hours, days, etc with the prettyPrint.  Also, it worked for the custom field type: Text Field (single line)

Ravina
Community Champion
July 29, 2022

Hi,

I have also tried this by using the Text field(single line) but it is not working. 

Any suggestion.

0 votes
Admin January 13, 2025

@Trudy Claspill hello , the result gives the duration off all days and not only business days .  Do you know haw to acheive the same result with only business days please ?

Trudy Claspill
Community Champion
January 13, 2025

Hello @Admin 

Please click the Ask button in the blue menu bar above to start your own new Question post.

1. Creating a new Question will get it better visibility in the community than adding to a post that is three years old.

2. Adding to such an old post is referred to as "necroposting" and is considered poor community etiquette.

Suggest an answer

Log in or Sign up to answer