How can I wild-card search with issueKey value?

dennis.werner
Contributor
October 20, 2021

I'm creating a filter query for a dashboard and want to search for MY team's issues (along with other criteria).

My query includes "AND issueKey >="XXXX" AND issueKey <XXXY" because I want values like XXXX-100 and XXXX-101 and etc.  [My team is XXXX.]

But wildcards are not allowed, so I can't say issueKey = "XXXX*"

This article https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/#Advancedsearchingfieldsreference-IssueIssuekey

says that the following operators are supported for issueKey searches: 
= , != , > , >= , < , <=, IN, NOT IN

But it doesn't look like they are.

I'm getting errors indicating that  "The issue key 'XXXX' for field 'issueKey' is invalid."

4 answers

1 accepted

0 votes
Answer accepted
Fabian Lim
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 20, 2021

Hi @dennis.werner

Unfortunately, this is not possible.

Regards

0 votes
Ivan Nikolov November 5, 2024
project = "Quality Assurance"
AND issueFunction in issueFieldMatch("project = QA", "issuekey", "QA-*")

 If it helps anyone, I was facing similar issue and eventually the above query worked for me as was able to use a wild card search for filed 'issuekey'.

0 votes
Daniel Turczanski - __JQL Search Extensions
Atlassian Partner
October 21, 2021

Hi @dennis.werner ,

Standard JQL doesn't easily allow searching for exact words, special phrases and patterns.

To get the wildcard support, use our professional indexing service JQL Search Extensions

After you install the app, you can simply search:

issue in wildcardMatch("description", "XXXX*")

Check out the documentation for more examples and other text matching functions.

I hope this helps!

Daniel

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.
October 20, 2021

Hi @dennis.werner 

I am a bit confused by what you are asking versus what you are showing as your example.  Would you please clarify?

You are correct that wildcards for issue keys are not possible, however the ranging you show is possible.  For example:

project = myProject
AND key >= "myProject-1000"
AND key <= "myProject-1010"
ORDER BY Key

And, those other operators work when you use specific issue key values.

Kind regards,
Bill

dennis.werner
Contributor
October 20, 2021

We have a lot of projects.

Using your pseudo-code :

 AND key >= "myProject-1000"
AND key <= "myProject-1010"

would require I know the oldest epic and most recent epic in my project.
We're adding them constantly, so that's not viable.

So what I want to do is just key off "myProject*" (wild card = ignoring the rest of the key value).

Yes, I could add something in an unused field, but there's a lot of folks who would forget to do that.

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.
October 20, 2021

Hi, Dennis.

Regarding people forgetting to add something, automation rules can help mitigate that.

But...let's pause a bit as you seem to be adding new things to your use case, such as oldest/newest epic, etc.

What problem are you trying to solve?  Knowing that may help focus ideas the community suggests.  Thanks!

dennis.werner
Contributor
October 20, 2021

I'm not adding to the use case.

re:  Oldest / newest.  Since the JQL won't accept wild cards, I have to give a REAL first value.  If I'm lucky, I can find the oldest to use there.

etc.

The problem I'm trying to solve is in here (your example):

 AND key >= "myProject-1000"
AND key <= "myProject-1010"

There are other projects  besides myProject.  Some are alphabetically LESS than "myProject" and some are alphabetically GREATER than "myProject".

I want to see just my project - regardless of how many there are - and regardless of new ones being added all the time.

What I want would have been possible if I could just select "myProject-*" with a wildcard.

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.
October 20, 2021

As the non-working wildcard seems to match just a project check, would the following work?  You could limit this with additional filtering on dates (e.g. created, updated, etc.)

project = myProject ORDER BY key

dennis.werner
Contributor
October 21, 2021

Interestingly, I always thought "myProject" was just a construct that JIRA imposed on epic naming.  I did not know it was a separate element.  But it seems to be just as you suggested in your filter.

I'll try that.

Thank you!

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.
October 21, 2021

Sorry if I confused the situation as I was using myProject as a placeholder for you to enter your project's name.  I should have been more clear.

__Bill

Suggest an answer

Log in or Sign up to answer