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

Using lookupissues to find related issues based on fixVersion

Bill Williams
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!
June 11, 2024

My overall effort is to find sub-tasks of issues whose fixVersion equals the fixVersion of a special "Release" issue as it transitioned into to a particular status.

I am trying to use lookupissues to find the related issues and using the JQL:  fixVersion = {{triggerIssue.fixVersion.name}}.

Every time I transition the status of the "Release" issue, the automation fails with:  Custom Smart Value JQL Search: "(fixVersion =) AND (project in (10010))" - Error in JQL Query: Expecting either a value, list or function but got ')'. You must surround ')' in quotation marks to use it as a value. (line 1, character 14).  I expected the fixVersion value from the triggering issue to be substituted for the {{triggerIssue.fixVersion.name}} but that is not occurring.

Am I doing something wrong (most likely) or is this a bug?

1 answer

1 accepted

0 votes
Answer accepted
Bill Williams
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!
June 11, 2024

I found the problem.  The helper that displays the smart values when typing the query shows triggerIssue.fixVersion.name; however, I found elsewhere the proper value is triggerIssue.fixVersions.name (note the 's').

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.
June 11, 2024

Hi @Bill Williams -- Welcome to the Atlassian Community!

I am glad you found that typo to fix the problem.

And also...will your trigger issue ever have multiple values in the Fix Version field?  If so, that JQL will need adjustment to handle one-to-many values:

fixVersion IN ( {{#triggerIssue.fixVersions}}"{{name}}"{{^last}}, {{/}}{{/}} ) 

That will produce the list of version names as comma-separated values.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events