In recent times I've had a number of people ask me "How can I see how long a story spent in each status?" and things like that.
Sending them into the history of a story to work it all out themselves is hardly an appealing proposition.
So I started googling for options and come across this:
Which is great!! but I decided to enhance it so that all status changes could be recorded in a “StatusChanges”(Paragraph) field that I found in our Jira instance that had not been used.
Here is what I've done:
Created "Days in Status", "Last Transition Occurred" and "Last transition status" fields as per the above link. Note: the "Last transition status" field isn't really needed, but it is useful if you wanna show the last transition and time via JQL or on a Confluence page.
For the automation
Using {{#changelog.status}}{{fromString}}{{/}} to provide the previous status
As well as updating the Days in Status field using:
{{now.diff(issue.customfield_10299|now).abs.businessDays}}
At the same time the StatusChanges field is updated:
The {{issue.customfield_10115}} part of this copies the existing content of the field back into what is otherwise an overwrite of the fields content.
{{now.diff(issue.customfield_10299|now).abs.businessDays}} is a copy of what is going into the “Days in Status” field, but making it visible.
I then created a 2nd automation rule set to run after the 1st Rule. It simply refreshes the Last Transition Occurred field for that issue, so that it is ready for the next Status changes populator (the !st Rule) run and can record the transition so that the {{now.diff(issue.customfield_10299|now).abs.businessDays}} is accurate.
The net result being a paragraph field that updates in real-time, the journey of each issues Status changes as measured in business days.
Curt Holley
Atlassian Solutions Consultant
Sentify
Wellington New Zealand
120 accepted answers
18 comments