Search Multiple Labels with Wild Cards

Dennis Ryan
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!
May 5, 2020

Hi Everyone, I'm a first time poster so sorry if I got any etiquette wrong

I have searched and found some related post but nothing that deals with both issues I am having. When adding to Issues or searching for Labels while creating Filters I see all of the Labels created by everyone in my company. Our instance of Jira Cloud is widely used so I see many similar Labels even though I may not use them on my Project(s). I'd like to be able to search for multiple labels as well as with wildcards so that I don't miss any potential combinations.

Example: I want to fine all Issues with Labels "Approv*", "Work*", "Etc*"

I have been able to use JQL to search multiple Labels:
Ex: project = "foo" AND labels = Approval AND labels = Workflow

We have ScriptRunner so I am able to search using wildcards:
issueFunction in issueFieldMatch("project = foo", labels, "(Approv*)")

What I cannot figure out is how to combine the two to search for multiple labels with wildcards.

Any help is greatly appreciated. I am not an advance user or administrator of the system so have limited access and knowledge.

Thanks in advance - Dennis

1 answer

0 votes
Kristian Walker _Adaptavist_
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 6, 2020

Hi Dennis,

Thank you for your question.

I can confirm that when using the *IssueFieldMatch* query that you can only specify one string to match on per query.

This means that to match on multiple words you would need to define a new query for each match and to join them together using the OR keyword which Atlassian provides.

This means to search for issues which match Approval or Workflow you would do something similar to below.

issueFunction in issueFieldMatch("project = foo", labels, "(Approv*)") OR issueFunction in issueFieldMatch("project = foo", labels, "(Work*)")

I hope this information helps.

Regards,

Kristian

Suggest an answer

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

Atlassian Community Events