Forums

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

Issue with Automation Rule - Error in Calculating Total Time Between Statuses

Ghazanfar Ali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2025

Hello Team,

I have created an automation rule where I am trying to track the total time a ticket spends from the moment it moves to "In Progress" until it reaches "Done".
However, I am encountering the following error during execution:

 

Edit work item
04/28/2025, 13:36:58

 

Unable to render smart values when executing this rule:
Missing parameter(s) for operator -u: (-)/1000/60/60

 

It seems the issue is related to calculating the difference between two date-time fields and then converting the result into hours.

Could you please guide me on how to correctly calculate the total time spent between these two statuses using smart values, and resolve this error?

Thank you for your support!


{{#=}} ({{now.convertToTimeZone("Asia/Karachi").withTime("20:00").millis}}-{{issue.customfield_10586.convertToTimeZone("Asia/Karachi").withTime("11:00").millis}})/1000/60/60{{/}}

 

1 answer

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 Leaders.
April 28, 2025

Hi @Ghazanfar Ali -- Welcome to the Atlassian Community!

To perform a date / time difference, please use the built-in diff() function to do so:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/#Date-difference---

Remember to include the units of measure (e.g., millis) at the end of the expression.

 

I also note your expression is setting the specific time values for both parameters.  Why do that if you are trying to measure the time between the values?

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events