Forums

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

Jira automation

Sathish Kumar
December 4, 2025

I have a field like MTTD, MTTR and im using this formula {{issue.Start Time.diff(issue.End Time).prettyPrint}} but its not calculating and providing the result in HH:MM:SS 

it gives in numbers like 135, 546

how can i fix this? 

I'm using the field type as text field. 

2 answers

1 vote
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 Champions.
December 5, 2025

Hi @Sathish Kumar 

For a question like this, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity
  • images of any relevant actions / conditions / branches
  • an image of the audit log details showing the rule execution
  • explain what is not working as expected and why you believe that to be the case

Until we see those...

 

You describe the field types are text.  Which fields are text?

If your Start Time and End Time field are text, they would need to be converted with toDate before they may be used with the date / time functions, such as diff().

 

Kind regards,
Bill

0 votes
Akash Singh
Community Champion
December 4, 2025

@Sathish Kumar Your smart value should work correctly and I have verified it in my site as well. Could you confirm below mentioned points for further troubleshooting,

  • Start Time and End Time are existing Jira custom fields in your site of type DateTime or Date.
  • If the fields do exist, then replace their name with their field id as shown below. Here customfield_12345 is Start Time and customfield_6789 is End Time field id.
    {{issue.customfield_12345.diff(issue.customfield_6789).prettyPrint}}
  • If the custom fields do not exists then you might want to use system attributes like created and resolved to achieve similar results but they might not give you the same result you are looking for.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events