JQL Query to find Stories with More than one Fix Versions that start with LCUS

Brian Lehmbeck May 12, 2023

I have a project where I am categorizing work into milestones using Fix Versions.

The below are the Fix Versions I have created:

LCUS Phase 1: 30-Jun
LCUS Phase 2: 01-Aug
LCUS Phase 3: 25-Aug
LCUS Phase 4: 22 Sep
LCUS Backlog

I would like to create a JQL query that returns a list of issue type of Story or Task that have more that one Fix Versions that start with LCUS.

Not sure how to do this and would appreciate any help.

4 answers

1 accepted

0 votes
Answer accepted
Sagar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 12, 2023

Hi @Brian Lehmbeck With the built in available JQL functions you will not get a issues with more than 1 Fix versions and you will need a plugin to get that like https://marketplace.atlassian.com/apps/1214791/jql-search-extensions-for-jira-the-jql-extensions?tab=overview&hosting=cloud

This provide the function as

issue in fixVersionCountGreaterThan("1")

Or if you fix version list is limited then you can try the combination query like

project = ABC AND fixVersion = (LCUS Phase 1: 30-Jun, LCUS Phase 2: 01-Aug) or fixVersion = (LCUS Phase 1: 30-Jun, LCUS Phase 3: 25-Aug) or fixVersion = (LCUS Phase 1: 30-Jun, LCUS Phase 4: 22 Sep) AND fixVersion ~ "LCUS*"

You can add more combinations to it to get detail result.

Thanks

Sagar

Brian Lehmbeck May 22, 2023

Thanks Sagar - 

Using JQL Search Extensions and using “fixVersionsCount > 1” as a condition I used your idea above (with some modification) and created the below query as a filter.

project in ("ABC") and issuekey in portfolioChildIssuesOf(ABC-50) and issuetype in (Story, Task) and status != Cancelled AND fixVersionsCount > 1 AND (fixVersion = "LCUS Phase 1: 30-Jun" AND fixVersion = "LCUS Phase 2: 01-Aug") Or (fixVersion = "LCUS Phase 1: 30-Jun" AND fixVersion = "LCUS Phase 3: 25-Aug") Or (fixVersion = "LCUS Phase 1: 30-Jun" AND fixVersion = "LCUS Phase 4: 22 Sep") Or (fixVersion = "LCUS Phase 1: 30-Jun" AND fixVersion = "LCUS Backlog") Or (fixVersion = "LCUS Phase 2: 01-Aug" AND fixVersion = "LCUS Phase 3: 25-Aug") Or (fixVersion = "LCUS Phase 2: 01-Aug" AND fixVersion = "LCUS Phase 4: 22 Sep") Or (fixVersion = "LCUS Phase 2: 01-Aug" AND fixVersion = "LCUS Backlog") Or (fixVersion = "LCUS Phase 3: 25-Aug" AND fixVersion = "LCUS Phase 4: 22 Sep") Or (fixVersion = "LCUS Phase 3: 25-Aug" AND fixVersion = "LCUS Backlog") Or (fixVersion = "LCUS Phase 4: 22 Sep" AND fixVersion = "LCUS Backlog")

Thanks for your help!

Brian

0 votes
Hannes Obweger - JXL for Jira
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
September 12, 2023

Hi @Brian Lehmbeck,

if you are open to solutions from the Atlassian Marketplace, this would now be easy to do using the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter issues based on regular expressions

With regular-expression-based filtering, you can apply pretty much any logic, including the one that you are after:

regex-filtering-multiple-versions-starting-with-x.gif

Once you've narrowed down your list of issues, you can work on your issues directly in JXL, trigger various operations in Jira, or export your issues with just one click.

Any questions just let me know,

Best,

Hannes 

0 votes
mauricio.groth
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.
May 15, 2023

Hi @Brian Lehmbeck

I’m Maurício, a support engineer at Appfire and I’m here to help you.

Unfortunately, using JQL of Jira, you’ll not be able to do it dynamically.

In the app where my team works, JQL Search Extensions for Jira, you can use this query to find all tickets that have more than one Fix Versions that start with LCUS:

fixVersionsCount > 1 AND fixVersion ~ "LCUS*" AND issuetype in (Story,Task)

Please contact our support if you have any other questions about this query.

We’ll be happy to help you!

Best regards,

Maurício

0 votes
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.
May 12, 2023

Hi @Brian Lehmbeck 

A query like this is not possible with the out-of-the-box JQL features.

How often do you need to do a query like this, and how many issues do you think meet this criteria?

  • need just one time
    • You could search for issues which contain that starting text, and then export the issues to refine the search in a spreadsheet
    • Or, you could create an automation rule to identify these
  • need often
    • You could investigate the Atlassian Marketplace for JQL addons which have this type of search feature

Kind regards,
Bill

Brian Lehmbeck May 12, 2023

I am going to use this as a filter in a Jira Structure so will be built into a Dashbaord utilized daily.

Suggest an answer

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

Atlassian Community Events