We have two custom sub-tasks in our project.
Lets Say A and B. These are generally created under the story.
We want to automatically link all the sub task B to sub Task as they are created. I
Ideally, under the story, only 01 sub task A will be there and Sub task B can be multiple.
If Sub Task A is more than one, we don't run the rule.
I have tried multiple ways to link but seems I am not able to achieve it.
The idea is to link Sub Task B to Sub Task A under the same Story, when Count of Sub Task A is only one.
Hello @Arun Unnikrishnan
When you use a branch like "For: Parent" the actions within that branch are going to be applied to the issue identified by the branch. In this case you Link Issue action will try to link the trigger issue to the Parent, not to another subtask under that parent.
Try this instead.
The Lookup Issues action looks for any subtasks of type "QC Sub-task" (you would specify Subtask B) under the same parent as the trigger issue/subtask.
The next step is to check how many issues were found by that lookup. You want to proceed if only when there was only 1 issue found.
And the last step is to create the link. The context of the rule is still on the trigger issue at this point, so you are creating a link in the trigger issue to another issue. You want to create that link to the issue found in the lookup. The lookup results are a list. Since there is only one item in the list, you can use the "first" attribute of the list to reference it. Add to that the "key" field, and you get the issue key of the first item in the Lookup Issues results list.
{{lookupIssues.first.key}}
You have to type in the smart value. And then click on the "Smart value..." block displayed below the field.
@Trudy Claspill Thank you so much for this. It works like a charm. Appreciate the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.