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

Automation for linking a new issue to an existing one

Georgi Valchev
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!
May 11, 2023

Hi all,

 

I would like to create an automation that will link a newly created issue to an existing one.

 

The use case is the following:

I create an issue within a project. The issue has the key, let's say, "PAY-6". I use a 3rd party app (Email This Issue) to email the issue to a non-jira user. Once they reply to the received email a brand new issue is created within the JSM project and that new issue contains the key (PAY-6) of the emailed issue in the summary. 

 

How should I set up the automation's condition so that the rule checks if the summary of the newly created issue contains a key of an already existing issue?

 

1 answer

0 votes
Oliver Siebenmarck _Polymetis Apps_
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.
May 11, 2023

Hi @Georgi Valchev ,

Welcome to the community!

This is a bit more tricky, as you'll have to find the old issue key in the summary of the newly created one. If that follows a certain structure, that should be possible. For clarity's sake, let's say the new issue's summary always looks like this: 

PAY-6 Something

That means, we can infer that everything left of the first space is the key of the issue you want to create a link to. You can then use the following smart value to reference that issue key:

{{issue.summary.split(" ").first}}

Next, build an automation like this:

Bildschirmfoto 2023-05-11 um 17.30.48.png

The UI is a bit weird here, but you can simply paste the smart value into the second dropdown. 

Hope that helps,
 Oliver

Georgi Valchev
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!
May 12, 2023

Hi @Oliver Siebenmarck _Polymetis Apps_ 

 

Thanks for your reply.

 

I created an automation exactly as you described, however, the new issue is not linked to the existing one. 

 

Even though I see the rule was executed, it shows an orange exclamation mark next to the rule's name, saying "SOME ERRORS"

image.png

 

An alternative I thought about is to forget about the issue keys and link the issues based on a string in the summary. Both the existing one and the new one contain the same text in the summary. Could you help me build an automation like this?

 

Regards,

Georgi

Suggest an answer

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

Atlassian Community Events