I’m trying to build a Jira Automation rule and I’m stuck on getting the transition to apply to the correct subtasks.
Setup
Parent issue has multiple subtasks of three types:
QA Subtask
FE Subtask
BE Subtask
Goal
When all QA Subtasks under the same parent are transitioned to Done, I want Jira to automatically transition:
FE Subtask and BE Subtask
only if their current status is “FEATURE BRANCH TESTING”
to Done
Is this possible to achieve?
Transition item will move the item, i want to move the FE Subtasks to done not the parent
Hello @Matthew Farrugia
Welcome to the Atlassian community.
Yes that is possible.
Please show us the entire rule you have created so far. Also show us all the details from the Audit Log for when the rule ran.
This is the rule I would use.
In the first Condition specify your subtask type; QA Subtask.
The Lookup Work Items action is looking for any QA Subtask type issues under the same parent as the trigger issue, where the QA Subtask status is not Done.
The condition that follows that is checking that the Lookup Work Items found no such issue; i.e. all QA Subtasks under the same parent as the trigger issue are in the Done status.
If that is true then the For: JQL branch is collecting all the subtasks under the same parent as the trigger issue that match the conditions you specified:
The branch will then transition each of those to Done. That transition will work only if here is a valid and accessible transition from FEATURE BRANCH TESTING to Done for those issue types, and the transition does not include a Transition Screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Added the current rule, what is pending is moving the FE Subtask to "done" but cannot figure out if this is achievable
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Matthew Farrugia
Thank you for the additional information.
The rule you have is using For Parent. That moves to focus of the rule to the parent of the trigger issue. Any action that you take in that rule, like Transition Work Item, will be executed against the parent unless you have a method to move the focus to a to the subtasks that you are looking up. Since it is not current possible to have a For Branch within another For Branch, the solution as you are trying to build it cannot be done.
The solution I presented in my previous response should work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Matthew Farrugia ,
This should be possible. Although one question:
When all QA Subtasks under the same parent are transitioned to Done, I want Jira to automatically transition:
You mention here that sub-tasks are transitioned to done, and then below, you say that you're looking to see if they are in status "FEATURE BRANCH TESTING."
So, I'm wondering which one it is?
Anyway, let's say you would like to iterate through each sub-task under the same parent. You could build something like this
But, you could also use related issues condition (potentially before the branch) to, let's say, check if the statuses of all other sub-tasks are in a specific status or status category.
This is the quickest I could think of, but there might be some more optimal solutions.
Again, if you could clarify the actual use case/requirement, that would be helpful.
Cheers,
Tobi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think the author means to check the status of the FE Subtask and the BE Subtask to see if those are in the "FEATURE BRANCH TESTING" status as a condition for transitioning those subtasks to Done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correct, a check before I transition the items
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.