Forums

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

Linking/Blocked multiple issues within an automation flow that are not in sequence

FR Jira Dev August 18, 2021

We have an automation flow that when an epic is created it created various tasks and subtasks in a specific project.  Many of these issues block each other but not in trigger issue order but will always be linked/blocked to the same task/subtask with a specific summary.

Is there a way to do this with smart values or other?

Example

Task: AWS has

  • subtask 1
  • subtask 2
  • substask 3

Task: Docker

  • subtask 4
  • subtask 5
  • substask 6

Subtask 2 will always be blocked by subtask 1

Subtask 5 will always be blocked subtask 3

Subtask 4 will always be blocked by subtask 3

It works if you add a linked field to the task or subtaks creation but only for the trigger issue, can you call out a specific subtask created in the sequence by summary as the blocker with a smartvalue?

2 answers

1 vote
Bill Sheboy
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.
August 18, 2021

Hi @FR Jira Dev 

Yes, you can link to a specific issue, other than those shown as trigger issue or most recently created.  To do so you will need to use the advanced JSON edit functions, as described here:

https://support.atlassian.com/jira-software-cloud/docs/advanced-field-editing-json/#Advancedfieldediting-JSON--Linkingissues

Also it appears you may be creating those sub-tasks with automation, perhaps in a branch or a single action (create sub-tasks).  For either case, there is no guaranteed order of issue creation for either of those methods...so you could not assume one sub-task exists for linking to until the rule completes execution.  As a result you may need to perform linking in another rule.  Please take a look at your rule flow and use case to see if that is possible.

Best regards,
Bill

FR Jira Dev August 19, 2021

Thanks @Bill Sheboy that could work, but to your point since there is no guarantee of creation order and it is not always the next outward issue, per my example sometimes it is a different task or subtask would it then use even with a new rule something more like this in the advanced JSON edit functions? and replace first with, fifth, etc.?

{{issue.issuelinks.first.outwardIssue.key}}
Bill Sheboy
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.
August 19, 2021

I see your point, and...

One solution, albeit a long one in a rule, is to create each task and subtask, one by one, saving the keys using the smart value {{createdIssue.key}} (for the last one made) into Created Variables.  And then edit the links with advanced JSON.

If you use no branches or only single item branches, the processing will be sequential and allow you to link issues exactly how you want.

0 votes
John Funk
Community Champion
December 22, 2021

Hi @FR Jira Dev  - Did you ever get this working? 

Suggest an answer

Log in or Sign up to answer