Hi Atlassian Community,
I’ve created a custom number field called Days in Current Status to track how many days an issue has remained in its current status. I configured an automation rule that runs daily and updates this field using the smart value:
{{now.diff(issue.statuscategorychangedate).days}}
Audit log shows status: SUCCESS
Debug comment on the ticket shows correct values. Example:Debug: SP-25 – Status: In Progress, Days: 6
The field is present on all relevant screens and visible in the issue detail panel
The value for Days in Current Status still appears as None
in the issue view, even though the field type is Number and editable.
Field is added to all required screens (7 screens across 2 projects)
Rule actor has full permission
No field context restriction
Tried using both:{{now.diff(issue.statuscategorychangedate).days}}
and{{now.diff(issue.status.lastChanged).days}}
Is there a known limitation with setting number fields via smart values?
This is an important metric for tracking workflow aging, and I believe many teams would benefit from seeing this number clearly.
Thanks in advance!
Hi @Paul Singh ,
If you're open to using apps, I'd love to recommend something we've built — it's called the Time in Status app.
One of the handy features is that it adds custom fields showing how long an issue has spent in each status, right on the issue card.
You can also use this data in basic automation and JQL searches, which makes tracking and reporting a lot easier.
Note: For Kanban boards, excluding the rightmost column ensures data relevance, focusing attention on actionable statuses.
Hope you find it helpful!
Hi @Paul Singh -- Welcome to the Atlassian Community!
The field statuscategorychangedate is text when accessed inside of a rule; it must be converted with the toDate function before use in the date / time functions.
For an example of that to calculate the Age of WIP measure, please see this old post I wrote:
And, you describe "Days in Current Status", but the field statuscategorychangedate is when the Status Category last changes, not when the Status last changed.
When you want the duration in the current status, you would need to try one of these:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Paul Singh
Could you share some screenshots of your automation? Would be interesting to see it, as it'll help troubleshoot the issue.
Seems like you've done a lot of work on it already. But one error in your logic is that the smart value only looks at the status category ie "to do" "in progress" "done". It doesn't take into account specific status names.
I've got something working for you using custom fields but it would be difficult to back date, it'll be very useful for all new tickets though if you'd like to see it?
Thanks
Aaron.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.