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:Ā 

Days Overdue Calculated Field Not Taking into Account Year

Rebecca Hagerty
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!
December 27, 2023

Hello,

I am trying to create a calculated field that shows the number of days a task is overdue.

My current automation is:

{{now.diff(issue.dueDate).days.abs}}

However, the problem is it isn't calculating properly. I have one due date that was in 2023, but it's calculating everything as if it was this year. How can I fix this?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
Trudy P Claspill
Community Champion
December 27, 2023

Hello @Rebecca Hagerty 

Welcome to the Atlassian community.

Can you show us your entire automation rule, please? Sometimes the results are unexpected due to the context in which a given step is executing.

Have you tried adding Log actions to your rule to print the {{issue.dueDate}} value into your rule execution Audit Log, to confirm the field has the value you think it should have?

What is an example of a dueDate used in this calculation and the result of the calculation that you think is incorrect?

Rebecca Hagerty
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!
December 27, 2023

Thank you for the reply. It is logging the correct date in the audit log, but calculating like the date is 2024.

 

2023-12-27_14-06-11.jpg2023-12-27_14-06-39.jpg2023-12-27_14-08-00.jpg

Trudy P Claspill
Community Champion
December 27, 2023

Hello @Rebecca Hagerty 

I don't see the error.

The difference in days between Aug. 21, 2023 and today (Dec. 27, 2023) is 128 days.

August 21-31 = 10 days

September = 30 days

October = 31 days

November  = 30 days

December current day = 27

10+30+31+30+27=128

128 is the value shown in Days Overdue.

What value do you think should be in that field?

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events