The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

Yong Yang
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
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.
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

Comments for this post are closed

Community moderators have prevented the ability to post new comments.

TAGS
AUG Leaders

Atlassian Community Events