I have a parent issue that has 4 sub-tasks assigned to different people. I've created an automation using a manual trigger and I'm running it off of one of the sub-tasks.
Parent ticket is SEC-8590
I'm trying to accomplish the following:
The list of issues should be all open sub-tasks and the parent of the triggering issue. So if I run the automation from SUB-1 (SEC-8591), the lookup list should return 4 issues: SEC-8590 (parent), SEC-8591, SEC-8592, and SEC-8593.
Since I'm attempting to run from a sub-task, I am using the following query to get my list of issues:
(linkedIssue = {{issue.key}} {{#if(exists(issue.parent))}} OR linkedIssue = {{issue.parent.key}}{{/}}) AND status != "Done"
I attempted to follow the advice in the comments here but when I run the automation on a subtask, it's only linking 3 issues and excluding the trigger issue despite it being returned as a lookup result. Am I missing something?
I have the Lookup action with log as a results check which returns 4 issues but the JQL using the same query is only returning 3 issues and the trigger issue is missing.
I believe that is the built-in behavior of rules to prevent potential errors/looping: the trigger issue is excluded from some branching scenarios.
A work-around is to add another branch to add that link explicitly. This can be done in two possible directions, so pay attention to your link direction. This could be...
or...
I believe you can do the first one with a project-scope rule, and the second one would require a global/multi-project scope rule as you are creating an issue in a different project.
Kind regards,
Bill
@Bill Sheboy thank you for explaining, I wasn't aware that the trigger issue is skipped in branching actions. Since my end goal is to link everything to a new issue I'm creating, I modified my Create Issue action and added a link to the trigger issue. This way I didn't have to add anymore steps to my rule. Every test I've run since then has has been successful.
Thanks again for this information!
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.