I almost have this figured out, but can't quite get it. Once a sub-task is marked complete, I would like the parent due date to change based on the NEXT sub-task due date.
I have figured out how to automate the change to the 1st sub-task due date, or the last due date, but can't figure out how to do the NEXT due date.
So far I have:
Issue Transitioned to: Done
If: Parent exists
For Parent:
If: some sub-tasks are in status "To-Do" or "In Progress"
Then edit due date: {{issue.subtasks.Due date.max}}
Using the above, I can update that smart value to "Max" or "Min" to get the 1st due date of my subtasks or last, but is there any way to get it to figure out of all the sub-tasks which one has the next due date?
Thank you!
Hi @Lisa Stone -- Welcome to the Atlassian Community!
I suspect this is possible, although it will be a more complicated solution. But first to confirm: what do you mean by the "NEXT sub-task due date"?
Best regards,
Bill
@Bill Sheboy - Thanks for your reply. It would be whichever subtask has the nearest due date, that isn't already complete. For example:
Subtask 1 - Due July 9th - COMPLETE
Subtask 2 - Due July 23 - NEXT
Subtask 3 - Due August 6th
Subtask 4- Due August 18th - LAST (Max)
Hopefully that makes sense.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks; that's what I thought you meant. :^)
The challenge is {{issue.subtasks}} smart value cannot sort; it can only see the min/max/average...
One work-around is to use JQL to get the subtasks in sorted order, yank out your due date, and then use it. Perhaps like this by expanding on your rule:
project = myProject
AND statusCategory != Done
AND issueType=Sub-task
AND parent = {{triggerIssue.parent}}
AND duedate IS NOT EMPTY
ORDER BY duedate ASC
I encourage you to initially write to the audit to see the progress of values, and don't add the edit action until you have fully tested the rule.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy Thank you for taking the time to do that. I will definitely play around with that and see if I can get it to work.
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.