Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

How to automatically link issues within an epic based on certain criteria

Edited

I'm pretty new to Jira automation, so hopefully this is easy. I would like to create an automation that would link stories and tasks together based on certain criteria, within an epic.

For example, in Epic 1, let's say Stories are created, "iOS Story 1", "iOS Story 2", and "iOS Story 3". I then create a task called "QA: iOS". I would like each of the iOS stories be linked to the QA iOS task (something like with the relationship of, "must be completed before", i.e. the stories must be completed before the QA task can begin).

Ideally, I'd like this to work both ways: if the above is all complete, and then someone adds an "iOS Story 4", the automation would run and link itself to the "QA: iOS" task.

I would also like this same automation to work for other epics going forward, so I can't link to any specific epic.

 

What I've tried so far:

  • Branch > "For Stories (or other issues in epic)" - this seems to be what I want, but I can't get this to work at all.
    • Screen Shot 2022-01-15 at 8.04.20 PM.png
    • When I use the above, then create a task called "QA: iOS", nothing happens - it does not link to the other stories in the epic with "iOS" in the summary.
  • Simply using the "Then: Link issue to" is much more straightforward; however, I don't know which issue to link it to. I'm not sure "Trigger issue" would make sense (wouldn't that link to itself?); I can enter in a specific issue key and that works, but I can't use that as I want this rule to apply to all epics going forward (but only run within one epic at a time). Is there a way to use JQL or other smart search to say, "find any issues in the same epic as the trigger issue, with 'iOS' in the summary"?

 

I would like it to look like this in the end, when creating either the "QA" task or any of the "iOS" stories:

Screen Shot 2022-01-15 at 8.17.39 PM.png

I will be doing the same for other platforms, so it will always be "QA" in the task and then either "iOS," "Android", or "Web" to find the corresponding stories.

3 answers

1 accepted

2 votes
Answer accepted

This is how I figured it out - basically Branch rule / related issues > JQL > "Epic link" = {{issue.epic.key}}. This searches for other issues within the same epic (then putting whatever conditions you want after that).

 

Screen Shot 2022-01-16 at 5.12.23 PM.png

2 votes
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 15, 2022

@Anna George 

Welcome!

I believe that in this case the problem is in the type of branch used. In an easier way, I got the result.

I made it work using JQL. I created an Epic named Linux and made it work like this:

Epic automation 1.PNG

You need to put Epic's summary condition in the JQL so that it reads that as the validator for the linked issue

 

And this was the result obtained in the issue (Story):

Epic automation 2.PNG

An interesting detail here is that the field "Epic link" usually filled when the issue is linked natively in Jira is not filled. So I would recommend you to think if it's not worth the use of linking these issues to your epic using the "Edit issue" action for the "Epic link" field. Because if you have epics with similar names, you may face problems with this JQL finding epics with the name "Linux" in your summary

 

View an issue using the epic link:

 

Epic automation 3.PNG

And this is the result in Epic with the separations of the issues in blue linked by automation using the "linked issue" and the issues in red using the native hierarchy of the epic by the "Epic link":

Epic automation 4.PNG

Maybe this will help. Feel free for more comments

Thanks for your reply. I'm not sure this will work for me since I want one rule to work for many epics. Is there a JQL query that checks through other issues in the same epic as the target issue? Not necessarily named "Linux" or anything else, but just comparing two issues and seeing if they are in the same epic

0 votes
Pramodh M
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 15, 2022

Hi @Anna George 

Welcome to the Community!!

I have changed the automation to automatically create the task issue when story is created which checks for Epic to be present, here's the automation rule

Let me know if this works for you, task is also linked to story in the automation

EST1.png

Thanks,
Pramodh

Joaquin Darquier
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Oct 16, 2023

I am looking to create 1 epic then 3 issues that I want to be children of this epic just created. 

I tried the above and it links the issues to the epic but it does not create the parent-child relationship I am looking for. 

Have you got that working? I see a lot of similar answers but I couldn't get it to work.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events