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?
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?
Thank you for the reply. It is logging the correct date in the audit log, but calculating like the date is 2024.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.