JQL to find list of issues that have same fix version?

Ayush Ghuliani September 21, 2023

I need help to automate releasing of a "release" but unable to fetch the issues that belong to a particular fix version using JQL in lookup issues option in Jira automation..

 

The objective is to trigger an automation to release a particular version once all the tasks part of that release are in status "Done/Deployed"

2 answers

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.
September 22, 2023

Hi @Ayush Ghuliani 

The fix version field is a list of values, and the rule needs to handle that accordingly.  And to use the membership IN operator the list of values needs to be in parentheses.  Finally, do any of your fix versions' names contain spaces or special characters?  If so, the names need to be wrapped with quotation marks.

Perhaps something like this for your rule:

project = NC
AND issuetype = Task
AND fixVersion IN ( {{#issue.fixVersions}}"{{name}}"{{^last}}, {{/}}{{/}} )

To learn more about list handling syntax in rules, please review this documentation:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/

Kind regards,
Bill

Ayush Ghuliani September 24, 2023

Really appreciate your help with this one

Like Bill Sheboy likes this
0 votes
Raja Shekher
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.
September 21, 2023

Hi @Ayush Ghuliani 

If I understand the question correctly, then you need to enter the JQL in the following way

Project = XYZ and fixVersion="Your Version" and Status ="Done/Deployed"

 

Hope this helps!

 

Regards,

Raja

Ayush Ghuliani September 21, 2023

Yes, and the fix version will be dynamic .

Tried using fixVersions IN {{issue.fixVersions}} but that does not give any result

 

earliestUnreleasedVersion() nextUnreleasedVersion() functions did not work for me either.

Raja Shekher
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.
September 21, 2023

To generate the fix version in a dynamic way - please use like below

{{issue.fixVersions.name}} - Returns the name of the fix version.

Raja Shekher
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.
September 21, 2023

This issue is part of the following releases:
{{#issue.fixVersions}}
* Fix version: {{name}}, released on {{releaseDate}}
{{/}}

// returns

This issue is part of the following releases:
• Fix version: Version 1.1, released on 2019-08-10T00:00:00.0+0000
• Fix version: Version 1.5, released on 2019-08-02T00:00:00.0+0000

Ayush Ghuliani September 22, 2023

To explain my objective better, attaching the screenshots.  These are all the issues part of Release 1.18.100 that are in "deployed" state. Now I want to close the release 1.18.100jira1.png

 

For this, i created the following rule, please have a look and let me know if it will work

jira2.png

 

{{issue.fixVersion}} or {{issue.FixVersions.name}} do not work in JQL

Suggest an answer

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

Atlassian Community Events