Forums

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

JQL to remove tickets with unique Labels

John Rudolph
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 10, 2024

I am currently trying to pull a report to show any bug without a certain label that is dynamic per story. In this case we have multiple bugs with service provider ticket numbers being track as a label example ICE_case#123456. I need to filter out those without a case number so I can review and issue to my team for action. 

This is what I have currently tried with no luck: 

  • Project = projectid AND Component = LOS AND Issuetype = Bug AND status in ("To Do", Blocked) AND Label not in "ICE_case#"
  • Project = SPS AND Component = LOS AND Issuetype = Bug AND status in ("To Do", Blocked) AND Label !~ "ICE_case#"

 

2 answers

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
June 11, 2024

Hi @John Rudolph

welcome to the community!

If you're open to solutions from the Atlassian Marketplace, this would 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 range of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting.

Plus, you can apply text filters (including logical expressions like NOT) on all issue fields, like so:

logical-text-filtering-labels.gif

For more advanced use cases, you can also filter via regular expressions.

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.

Hope this helps,

Best,

Hannes

0 votes
Mark Segall
Community Champion
June 10, 2024

Hi @John Rudolph and welcome to the community!

Unfortunately, JQL does not support a wildcard search against labels.  To be honest, this is not a best practice for using labels and you will likely need to change how you're capturing this data point.  Here are a couple options:

  • Replace with a short text custom field: This will allow you to perform a wildcard search
  • Combine with another field and automation: If you are insistent upon tracking this through labels, you could use an automation rule that every time a label is added to the issue beginning with "ICE_case#" that it sets another custom field.  Then you can execute your filter against the new custom field

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events