Hello,
We have been making the most of a recent upgrade to JIRA and Structure. The formula enhancements have been amazing.
I am looking for a way to find status changes within a time range for subtasks:
but so far I cannot work out if the development subtask of the current issue changed to "Developed" in the last 7 days.
Thanks for thinking about this and your suggestions.
Paul
Hello @Paul Doman ,
This formula should work for you:
IF issuetype = "sub-task":
with _today = today():
with _prev7 = date_subtract(_today,7,"day"):
with _changed = history
.FILTER($.time > _prev7).changes
.FILTER($.toText = "Developed"):
IF _changed != undefined:
"Developed Last 7"
For sub-tasks, it looks at "today" and then subtracts seven days. From there, we access the history and filter to only include changes made in the past seven days. We then filter again for those changes that were to "Developed". If there is a value after the filtering, we then output the text "Developed Last 7".
You can change the output text to whatever you would like, or you could use the Wiki Markup functionality to add some color to it!
Please let me know if this helps.
Best,
David
Hi David,
Thanks for your prompt assistance. Unfortunately I omitted a significant fact:
- to make this a useful management tool, the structure only has parent issues, no subtasks;
- so the formulae probe what is going on in the subtasks using "subtasks.FILTER...." to quite an extent
- and it works out an overall state of the parent by combining individual subtask status according to our business rules (not for automation purposes, only to show who is the next contributor and what they should be doing - which subtask, and which activity).
- and the result appears on the parent issue line in the structure:
The result is that this information - one line per issue on the structure - shows us where things are at, without getting bogged down in the individual subtasks and their status. And if necessary it can be exported to CSV cleanly, without the subtask clutter.
So...
Applying your suggested code to the extended "subtasks.FILTER..." looks like it has solved my problem. That will make life much easier for colleagues.
Many thanks
Paul
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.