JQL filter to exclude issues that have ONLY a specific component

Aljoscha Zöller November 11, 2024

The service management project has some components (alpha, bravo, charlie, delta, echo..).

I want to have a queue (based on a JQL filter) where I want to

  • show all issues with no components (component IS EMPTY)
  • show issues that have one or more components
  • do not show issues that are only related to the component "alpha" (component != "alpha")
    • (issues with component "alpha" + at least another component need to be in result set)

The only way I can think of is to list all components except "alpha":

component IS EMPTY or component IN ("bravo", "charlie", "delta", "echo") 

Unfortunately if someone adds a component to the project in the future, this JQL filter will have to be updated. This can be a huge source of errors.

Is there a way to do this generic (excluding one value)? In SQL you would for example work with a subquery.

Thank you very much

2 answers

2 accepted

1 vote
Answer accepted
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 11, 2024

Hi @Aljoscha Zöller 

 

I'm afraid that in order to display issue with a component and not other, you have to list them all like

component = "A" AND component not in ("B", "C", "D", ...)

 

I check Scriptrunner JQL function but did not find a way to do it for this field. In theory this should have worked, I use it for other custom field but it do not seems to work for component field.

 

componenets = A and NOT issueFunction in issueFieldMatch("component is not empty","components","(.*)[,](.*)")

Maybe there is another 3rd party app that provide synch JQL function.

Regards

 

 

0 votes
Answer accepted
Hannes Obweger - JXL for Jira
Atlassian Partner
November 11, 2024

Hi @Aljoscha Zöller

just to add to @Florian Bonniec's great answer:

If you're open to solutions from the Atlassian Marketplace, this would be easy to do using the app that my team and I 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 range of advanced features, including the ability to filter issues via regular expressions

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

regex-filtering-single-component.gif

The regex that I'm using is

^Portal fluid$

which matches issues that have this exact one component set.

Once you've identified your issues, you can work on them directly in JXL (e.g., bulk edit them via copy/paste), or trigger various operations in Jira.

I should also add that JXL can do much more than the above: From support for configurable issue hierarchies, to issue grouping by any issue field(s), sum-ups, or conditional formatting.

Any questions just let me know,

Best,

Hannes

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
5.12.13
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events