Hello, I'm having some issues getting this automation working correctly. Here is the flow:
I've tried variations of the following:
but no luck.
Any help would be much appreciated!
Hi @Pfdev11
The Sprint Started trigger for a rule does not supply any issues to it, and thus any sub-tasks associated to those issues cannot be accessed directly by branching. And, it appears you are using Jira Data Center, which further restricts the options to solve your scenario.
One way to solve this is with some dynamic JQL:
Kind regards,
Bill
Thanks Bill! For the "Lookup Issues with JQL" part, can I get the sub-task issues right from that, and then branch on it "For Sub-Tasks"? Something like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, you cannot...
This is why the two steps are needed to first get the parent issues assigned to the Sprint with the lookup, and then get the subtasks for those parents with dynamic JQL from the lookup results
That dynamic JQL expression joins together the keys of the issues assigned to the sprint, and then finds any issues for which those were the parents.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got it! This is working now. Thank you for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Pfdev11
Thanks for the question.
I tested this logic, and it works. Please also check on your side.
Trigger: Sprint Started
Branch Rule: For JQL, put this JQL
sprint = {{sprint.id}} AND issuetype in subTaskIssueTypes() AND assignee IS EMPTY AND summary ~ "Testing|Unit"
Condition: Parent Issue --> Assignee is not empty
Action: Edit Assignee - {{issue.parent.assignee}}
Let me know if you have any questions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the reply! I tried what you put, but the sub-tasks remained unassigned. Only difference is I have it when sprint started instead of completed.
When I check the audit log, it says no related issues could be found under Branch rule / related issues.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Pfdev11 -- Subtasks are not assigned to a sprint normally as they "inherit" that condition from their parent issue, and thus that JQL would not find them. Please see what I suggested to handle this situation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have something similar; but try this:
Inside the “For sub-tasks” branch, the context changes:
{{issue}} refers to the sub-task
{{issue.parent}} refers to the parent issue
In the earlier setup, the parent wasn’t being referenced explicitly when checking the assignee. So even though the condition looked valid, Jira didn’t actually know which assignee you were referring to.
try to explicitly use:
{{issue.parent.assignee}}
when checking or copying the assignee.
Once you reference the parent correctly inside the sub-task branch, the automation should behave as expected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Tim, thanks for the reply! I am getting this error:
"Can't branch rule as it requires issue(s) in the context for this option." This was my last attempt (got rid of the conditional summary checks for now): maybe I have to use JQL to reach the subtasks? I figured it would look at only sub-tasks at the branch, check if they are in the sprint and assignee is empty, and then check the parent's assignee.
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.