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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,455,715
Community Members
 
Community Events
175
Community Groups

How to automatically link issue based on custom field?

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 Dec 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.

Hello @Trudy Claspill ,

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

 

automation.png

Trudy Claspill Community Leader Dec 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

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

"=" 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

Atlassian Community Events