Forums

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

Automation to calculate the difference between old and new Due date

Hello All, recently came across a scenario where user want to calculate the difference of days between old and new due date when due date field is changed. The following automation rule will help achieve this requirement.

Screenshot 2025-05-22 at 8.13.13 PM.pngScreenshot 2025-05-22 at 8.13.21 PM.pngScreenshot 2025-05-22 at 8.13.28 PM.png

Screenshot 2025-05-23 at 2.19.58 PM.png

Screenshot 2025-05-22 at 8.13.48 PM.png

 

3 comments

YY Brother
Community Champion
May 22, 2025

Thanks Mohanraj. 

Good practice to show us the usage of value change smart value and the date function. 👍🏻

Like Mohanraj Thangamuthu likes this
Yoann LEGRAND
Contributor
May 23, 2025

Hi @Mohanraj Thangamuthu , 

Thanks for sharing, I actually got this exact question from two of my clients recently.

However, I think your calculation is reversed :

{{currentDuedate.toDate.diff(previousDuedate.toDate).days}}

Should be :

{{previousDuedate.toDate.diff(currentDuedate.toDate).days}}

Otherwise, the result will be negative :)
For example, if the date changes from 05/23 to 05/29, it will show -6 instead of 6 days.

Have a nice day ;)

Like Mohanraj Thangamuthu likes this
Mohanraj Thangamuthu
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 23, 2025

Thanks for pointing out @Yoann LEGRAND 

Like Yoann LEGRAND likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events