Automation to link issues with the same summary not working

Igor Seidl October 14, 2024

Hi!

 

We need to create an automation that whenever an new issue is created it checks for issues with the same summary, and then it links the new issue to all issues with the same summary. 

 

We´ve already checked the  forum answers below:

Solved: Automation JQL condition: using smart values (atlassian.com)

Solved: Jira automation - link issues with same field valu... (atlassian.com)

 

It didn´t solve the issue we´re facing.

Here is our current automation:

SS 01.png

When we run it, the automation log registers the following:

SS 02.png

It seens like the JQL and branch rules are okay, but the link simply does not work, as nothing happens.

If we change the link rule to {{issue.summary}} we then get the following result:

SS 03.png

Does anyone has any idea about how to fix it?

3 answers

1 vote
Bill Sheboy
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.
October 14, 2024

Hi @Igor Seidl 

Perhaps beyond the scope of the permissions issue you are observing, there are some other things to note:

 

First, the Issue Created trigger can fire so quickly that some issue data may not yet be available to the rule.  This can cause missing data and mysterious errors, such as permissions ones.  The fix for that is to always add the Re-fetch Issue action immediately after the Issue Created trigger, and before other rule steps.  This will slow down processing a bit and reload the data before proceeding.

 

Next, your rule is using JQL with the CONTAINS ~ operator: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CONTAINS----

What do you mean by "checks for issues with the same summary"?  Do you mean:

  1. a similar summary with the same words, in any ordering; or
  2. an exact match to the summary, with no other words present

As your rule is shown, the CONTAINS operator will do the first one.  To perform an almost exact match, use the exact phrase syntax in the rule:

summary ~ "\"{{triggerIssue.summary}}\""

Escaping the quotation marks around the value will try for the exact match...however that could be led (or followed) by other text.  For example, if the trigger issue summary was, "this story is about squirrels", it would match the following summaries:

  • this story is about squirrels
  • here is leading text and this story is about squirrels
  • this story is about squirrels with some trailing text
  • here is leading text and this story is about squirrels with some trailing text

 

You could adjust your rule accordingly if you truly need an exact match of the summary:

  • trigger: issue created
  • action: re-fetch issue
  • action: lookup issues with JQL to check if other issues have the similar summary, using the exact phrase syntax and excluding the trigger issue
  • smart value condition: check that the lookup returned issues
  • branch: on JQL with the same as above
    • smart value condition: now use the equals condition to test for an exact match of summary 
    • action: link to the trigger issue

 

Kind regards,
Bill

0 votes
Jack Tucker
Contributor
October 14, 2024

Hey @Igor Seidl

Your automation looks good to me, do you have anything setup in Issue Security for this project? From the looks of the Audit log this might be the issue. 

Igor Seidl October 14, 2024

Hi @Jack Tucker , thanks for the response.
I tried to create a new issue security scheme:

SS 05.png

But I was unable to connect it to the specific project (in this case, "Cobranças"). I tried to make this new security scheme the "default" but when I run the automation, I still get the same result:

SS 06.png

It´s officially a sucess, but nothing happens and no issue is linked to another. What we need is to link the newlyl create item (in the case, the CRC-3077 one) to others with the same summary (in the case, the issues CRC-3074, CRC-3075 and CRC-3076).

Jack Tucker
Contributor
October 15, 2024

@Igor Seidl - If you go to the Project > Project Settings > Issue Security, can you see any issue security applied to the project?

Am thinking you might need to add "Single user (Automation for Jira)" if you have issue security setup in the project. 

Igor Seidl October 15, 2024

It´s a team-managed project, so there´s no Issue Security menu. 

SS 09.png

 

0 votes
Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2024

Hi @Igor Seidl 

Welcome to the community!

Try using the Branch rule "Similar issue description" this will look for Summary and Description and you can adjust the similarity!

Screenshot_2.pngI hope this helps!

Best regards

Sam

Igor Seidl October 14, 2024

Thanks for the idea @Samuel Gatica _ServiceRocket_ , but it didn’t work.

SS 04.png

The description field isn’t what we want to check (we need the same summary), but it was worth testing. Unfortunately, it didn’t work.

Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2024

Hi @Igor Seidl 

The Branch rule "Similar issue description" will look for a match in the Summary or Description.

Can you please upload the Automation details?

 

Best regards

Sam

Igor Seidl October 14, 2024

Hi! thanks for the clarification.

The automation is:

SS 07.png

 

And the audit log when after adding a issue with the exact same summary of the previous is:

SS 08.png

But it results in nothing. No issue is linked, nothing changes in any issue.

 

Samuel Gatica _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 14, 2024

Hi @Igor Seidl 

In the image uploaded, you are using the JQL branches, instead, change this to the Branch rule "Similar issue description" and then update the similarity to your best convenience. Please follow the example in my first comment.

 

Best regards

Sam

Igor Seidl October 15, 2024

Hi, I just did it like you suggested with 2 different similarities and in both cases the search fails to find more issues with the same summary (and all cases had the exact same summary) and to create any link.

 

Similarity: similar

Automation:

SS 10.png

Audit log:

SS 11.png

Similarity: Very similar

SS 12.png

Audit log:

SS 13.png

 

Suggest an answer

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

Atlassian Community Events