You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I want to use ~ (CONTAIN) JQL operator in my JIRA query on Label field to search for any label, that contains specific phrase.
AND labels ~ 'ServiceNow'
Is it possible ? Thanks
I think "contains" is misleading in the name of the function, it's more "like" than "contains". The English version of your query is closer to "and there is a label like 'ServiceNow'"
But the answer is a simple "no". ~ searches for text in text fields. Labels are a set of fixed terms, a select list rather than text.
As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.
With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.
Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions
Using this query will show any issue that contains a specific phrase in the label field:
issue in wildcardMatch("labels", “*ServiceNow*”)
Check out the documentation for more examples.
I hope this helps!
I wonder what the technical reason is Atlasian has not implemented ~ for labels? It is implemented for several other fields. As a workaround to a sensible implementation in JQL I have to install a plugin or do a cumbersome JQL workaround where I have to check for all my labels (of which I can have many - in my current example I have around 20).
It's a weird field to me - it is sort of text but not really because it becomes a list of values, also. But it's not a true list of values to me, either. But it is closer to that than text, which is what uses the ~