lookupIssues to find existing Epic

Rafael Vasquez November 13, 2023

Hello. I need help setting up an Automation Rule.

I have multiple Trello boards to interface with clients upon onboarding. 1 Trello board per customer. There are Trello Buttons that create different Issues on a JIRA Project

In the JIRA project, I want each customer to be an Epic


Trello Button captures the Trello Board Name and copies it to the summary field of the created Issue

I need the rule to:
1. Look in the Project if there is an existing Epic whose summary field matches the summary field of the created Issue
2. If there is a match, it should link the created Issue to the matched existing Epic
3. If there is no match, it should:
3.1. Create a new Epic and copy the summary field from the created Issue and set it as the Epic summary field
3.2. link the created Issue to new created Epic

Thanks in advance!!

1 answer

1 accepted

0 votes
Answer accepted
Muhammad Moazzam Hassan
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.
November 13, 2023

14-November-2023 (257).gif

Muhammad Moazzam Hassan
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.
November 13, 2023

Here is your rule.

Rule Triggered on Issue Created.

Then it will lookup issues by using JQL issuetype = Epic and Summary ~ "\"{{issue.summary}}\""


If epic exists with the same summary then we will figure out the lookup issue size if we have found only one epic then it will linked it to the lookupissue via smart value {{lookupIssues.key}}.

Else if the size is not equals to 1 then it will create new epic and linked it with the Trigger Issue.

Note: "\" \"" This notation will find the exact phrase and if more than two Epics with the same summary found the rule will not linked both of them but it will create new Epic an linked that Epic, because we have condition that size must equals to 1.

Rafael Vasquez November 13, 2023

@Muhammad Moazzam Hassan  thanks!! However,

The existing Epic is indeed added to "Linked Issues". But the Issue is not "Linked" to the Epic (it shows in my backlog under "Issues with no Epic")

How can I add the Epic to this Issue (see screenshot)

Appreciate your help! Screenshot 2023-11-14 at 07.14.44.png

Muhammad Moazzam Hassan
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.
November 13, 2023

image.png

Muhammad Moazzam Hassan
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.
November 13, 2023

Then set Epic Link as well, but please note that if the Created Issue is Epic the rule will fail because Epic does not have a child Epic. To avoid this you must have to verify the create issue is a Story Issue Type like Task, Bug, Story.

Rafael Vasquez November 20, 2023

@Muhammad Moazzam Hassan rockstar!! Your solution is working perfectly. Thanks (I've been banging my head around this for weeks)

Suggest an answer

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

Atlassian Community Events