Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Linking two custom sub-tasks

Arun Unnikrishnan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 19, 2023

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. 

 

MicrosoftTeams-image (7).png

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. 

 

MicrosoftTeams-image (8).png

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. 

2 answers

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Champion
December 20, 2023

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.

Screenshot 2023-12-20 at 8.42.40 AM.png

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.

Screenshot 2023-12-20 at 8.44.05 AM.png

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.

Screenshot 2023-12-20 at 8.45.08 AM.png

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.

Screenshot 2023-12-20 at 8.48.20 AM.png

0 votes
Arun Unnikrishnan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 22, 2023

@Trudy Claspill Thank you so much for this. It works like a charm. Appreciate the help.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events