Forums

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

is there a way to create a filter with keys ending in odd numbers?

Ricardo Martinez
Contributor
February 7, 2024

Hi

 

I need a filter that will allow me to get the issues that have a Key ending with odd number and another filter with even number.

 

How could I achieve this in the jql filter?

 

Thanks in advance

3 answers

1 vote
Jack Brickey
Community Champion
February 7, 2024

There is nothing in JQL that would allow for this. What is the use case here? Maybe there is some alternative solution. If I understood your used case, I might be able to offer such an alternative.

Jack Brickey
Community Champion
February 7, 2024

I guess you could export this to excel and deal with it there.

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
February 7, 2024

Hi @Ricardo Martinez

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 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 via regular expressions

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

regex-filtering-uneven-issue-keys.gif

The regex that I'm using is

[13579]$

which matches any string that ends with an uneven digit.

[02468]$

would be the regex for all even issue keys.

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.

Any questions just let me know,

Best,

Hannes

0 votes
Revathi Segu
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!
February 7, 2024

There is no direct way to filter these issues using JQL filters.

  • Instead try to get the numeric portion(ABC- 234) of the issue key value through Script and validate whether it (234) is even/odd and add the issue data to an excel/ list if that is odd/even respectively. 
  • Also try to create a custom field with numeric value from the issue-key and validate the same.

Any of the above two solutions might resolve the issue.

Suggest an answer

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

Atlassian Community Events