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

How to automatically link issue based on custom field?

Jeroen Gouma December 14, 2022

We receive automated alerting emails from different monitoring sources. All emails contain an incident ID. I use automation to store this incident ID in the custom field ExternalID.

Whenever the monitoring has an update on the issue we receive another email where the incident ID is the same (same incident), but the status <> new.

How to link these issue's together based on the external incident ID?

Did several attempts, but none of them succeed. The current flow I have extracts the externalID and puts this in the custom field:

2022-12-14 10_14_22-Window.png

This ends with the following error:"Can't branch rule as it requires issues to have been previously created by this rule. More than likely you have not yet created an issue or the issue(s) were created in an another 'If' block or branch - these would then not be visible outside of that block/branch."

But I'm sure more issue's exist with the same external ID. 

Hope somebody has the golden hint...

Jeroen

1 answer

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 14, 2022

Hello @Jeroen Gouma 

Can you show us the entire rule?

I suspect that you need to change the branch type from "All created issues" to JQL, and then use a JQL statement to select the issues that have that external ID value.

Jeroen Gouma December 14, 2022

Hello @Trudy Claspill ,

Thank you for your reply, please see the screenshots below.

 

automation.png

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 15, 2022

Thank you for that additional information.

So, yes, I believe in this case you need to change the "Type of related issues" choice to JQL.

Screen Shot 2022-12-15 at 10.13.18 AM.png

Enter a JQL statement to search for issues that have the matching External issue id value and that are not the issue just created. That would be something like this:

ExternalID = {{myExternalIncidentID}} and issue != {{triggerIssue.key}}

 Make sure to uncheck the "Only include" box.

That should retrieve all the issues that have the same External ID value. You might want to add a "project = " criteria also, just to make sure the search is constrained to the specific project to which this rule applies

Jeroen Gouma December 15, 2022

Thanks @Trudy Claspill , 

only had to make 1 small change, but now it works:

ExternalID~ {{myExternalIncidentID}} and issue != {{triggerIssue.key}}

Note the ~ behind ExternalID instead of =. This is probably related to the type of field which is used to store the externalid.

 

Jeroen

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 16, 2022

"=" works if it is a number field. If it is a text field you have to use "~".

Suggest an answer

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

Atlassian Community Events