Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

linkedIssues function not working in Branch rule / related issues component of Jira automation

German Dobrilovich January 9, 2024

The function works correctly in the filters section:

1ok.png 

but when I run the same JQL in the automation test it shows "0 issues found":

2.png

 

Could someone help me find out where the error is?

Thanks!

 

1 answer

1 accepted

0 votes
Answer accepted
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.
January 9, 2024

Hi @German Dobrilovich 

What is the scope of your rule: project, global, or multiple-projects?

And if it is project scope, in which project is your rule stored?

 

I hypothesize your rule is project-scope and not in the PRIUR project.  Thus the rule only has visibility to issues in the rule's project, and so the JQL returns no issues when you try to validate it.

When a rule needs to access issues in all (or multiple projects), create the rule at a global scope and adjust the rule details accordingly.  Only a Jira Site Admin (or Org Admin) can create such rules, as they can have a large impact on the site.  Please discuss this with your admin for more details.

Kind regards,
Bill 

German Dobrilovich January 9, 2024

Hi @Bill Sheboy , thanks for the reply! It is multiple-projects

I adjusted the configuration adding the 2 projects that are affected by the automation and JQL finds the correct issue.

But when replacing the issue id in the JQL with the smartvalue {{issuekey}} it stopped working and shows this error:

 

Screenshot 2024-01-09 at 13.04.17.png

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.
January 9, 2024

Thanks for that audit log image, as it shows the smart value added to the JQL for the linkedIssues() function is null / empty.

Would you please show images of your entire rule and an image of the branch details with the smart value in that function?  That context may help explain what is happening.

German Dobrilovich January 9, 2024

@Bill Sheboy of course!

The objective of automation is to detect modifications in the issue of a project and synchronize it with the issue of another project (both issues are linked issues)

Screenshot 2024-01-09 at 14.03.24.png

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.
January 9, 2024

In your branch JQL, it has this:

issue IN linkedIssues({{issuekey}})

I believe it should instead be this:

issue IN linkedIssues( {{issue.key}} )
German Dobrilovich January 9, 2024

 @Bill Sheboy It worked perfect, thank you very much!

Like Bill Sheboy likes this

Suggest an answer

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

Atlassian Community Events