Difference between 2 dates in days

Tehmina Aslam
Contributor
February 11, 2025

I have 2 fields Due date and Modified Due date. I want to get the difference between these two dates in days. 

I tried the following formula: 

{{[issue.Due date.diff(issue.Modified Due date).days}}

Then I tried even the Field ID:

{{[issue.Due date.diff(issue.customfield_10837).days}}

 

But that still does not work, The rule runs successfully but the field Lag time is never updated with value. 

2025-02-12_12h57_15.png

1 answer

1 vote
Vishal Biyani
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.
February 12, 2025

@Tehmina Aslam 

Can you copy the calculation in smart variable and then use that smart variable to update the issue? i think it should help resolve the issue.

 

Also there looks to be an extra [ bracket before Issue. That is not needed

 

Share your audit log as well

Tehmina Aslam
Contributor
February 12, 2025

Thanks man, there was an extra bracket :D 

 

{{issue.Due date.diff(issue.modifiedDueDate).days}}

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events