Hi Community, I have gone through numerous posts and the altassian help section but I am unable to find an answer to my predicament of being able to advance search using JQL to get the result I want and was hoping someone could help me.
The scenario:
I have over a few thousand jiras in my jira instance that have multiple labels and I would like to search for jiras meeting certain criteria.
Few Jiras have labels of ('Australia', 'Paris','Paris-G11', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Priority','Dev')
Few Jiras have labels of ('Europe', 'PARIS','App')
I would like to get the result that only shows me the Jiras that have the labels of Australia and 'Paris' but not ones that have Australia, Paris and 'Paris-G11'.
I tried the query: labels = 'Australia' AND labels = 'Paris' and labels != 'Paris?G*'
also: labels = 'Australia' AND labels = 'Paris' and labels != 'Paris\-*'
also: labels = 'Australia' AND labels = 'Paris' and labels not in ('Paris?G??')
and other similar combinations as well as labels in ( 'Australia','Paris') and labels not in ('Paris?G??') but I always got different results or errors but not the result I was looking for.
I know it might be a fundamental JQL syntax error but I have been unable to get the result I need. Any help is greatly appreciated.
Sandeep,
You should be able to just use this code:
labels in (Australia, Paris)
And it will find only Australia and Paris, not Paris-G11 or any perform any wildcard. This will also search all issues/projects that you have access to. You can limit it down even further by using other JQL functions if needed.
Try pasting that into the advanced search in your JIRA instance and see if that returns what you're needing.
-Josh Loe
Thanks for the reply Josh. Ive tried that JQL too before and only after that did I post here for help. Unfortunately it pulls jiras that have the 3 different sets of labels mentioned above plus any jiras that have either Australia or Paris in them not just the combination.
If i want to get jiras with just the Australia and Paris then I need to put the JQL filter for labels seperately like i mentioned above and that filters out most of the other jiras but still includes the ones that have Paris-G11 too.
So any other suggestion that you think might help is appreciated.👍
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, ok I see what you're trying to do now.
Lets give this another try. Example:
labels in (Australia) AND labels in (Paris) labels not in (Paris-G11,Priority,Dev,Europe)
Trying this on my test instance with multiple labels on issues, the syntax I provided before did catch the issues that had the label but did not exclude any issues that had multiple labels. Making the adjustment above, I see only issues that have Australia and the Paris label making sure anything else is in the excluded part of the not in ( ) function.
Let me know how it goes Sandeedp,
Josh Loe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Josh,
I apologize for causing some confusion here and for not being clear and explaining the problem more clearly. Let me give it another go...
So, I have jiras with multiple labels and different combinations like:
Few Jiras have labels of ('Australia', 'Paris','Paris-G11', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G12', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G9', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Priority','Dev')
Few Jiras have labels of ('Europe', 'PARIS','App')
And more different labels.
I am trying to filter out jiras that have Australia and Paris in combination with other labels but do not have 'Paris-G11', Paris-G12' and so on, so that I have the list thats missing the Paris-G* labels in them. take for example from the above label combinations, I want the ones that have ('Australia', 'Paris','Priority','Dev') but not the ones that have ('Australia', 'Paris','Paris-G11', 'Priority','Dev') or ('Australia', 'Paris','Paris-G9', 'Priority','Dev').
If you notice the first first 3 sets of labels have an additional label of Paris-G* to ('Australia', 'Paris','Priority','Dev').
The query I tried based on your last suggestion was
labels in (Australia) AND labels in (Paris) labels not in (Paris-G11, Paris-G12, Paris-G9) Type != 'Tecnical task'
And I got results that included anything that had even the Paris-G* labels and there were no exclusions done. I also got the results that didnt include the technical tasks like I wanted.
Sorry for the long reply but hopefully I have explained it better for you to be able to help me out.
Also in addition to that is there a way I can filter out the lower case Paris label to the upper case PARIS label too.
Your help is much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Josh,
I apologize for causing some confusion here and for not being clear and explaining the problem more clearly. Let me give it another go...
So, I have jiras with multiple labels and different combinations like:
Few Jiras have labels of ('Australia', 'Paris','Paris-G11', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G12', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G9', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Priority','Dev')
Few Jiras have labels of ('Europe', 'PARIS','App')
And more different labels.
I am trying to filter out jiras that have Australia and Paris in combination with other labels but do not have 'Paris-G11', Paris-G12' and so on, so that I have the list thats missing the Paris-G* labels in them. take for example from the above label combinations, I want the ones that have ('Australia', 'Paris','Priority','Dev') but not the ones that have ('Australia', 'Paris','Paris-G11', 'Priority','Dev') or ('Australia', 'Paris','Paris-G9', 'Priority','Dev').
If you notice the first first 3 sets of labels have an additional label of Paris-G* to ('Australia', 'Paris','Priority','Dev').
The query I tried based on your last suggestion was
labels in (Australia) AND labels in (Paris) labels not in (Paris-G11, Paris-G12, Paris-G9) Type != 'Tecnical task'
And I got results that included anything that had even the Paris-G* labels and there were no exclusions done. I also got the results that didnt include the technical tasks like I wanted.
Sorry for the long reply but hopefully I have explained it better for you to be able to help me out.
Also in addition to that is there a way I can filter out the lower case Paris label to the upper case PARIS label too.
Your help is much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Josh,
I apologize for causing some confusion here and for not being clear and explaining the problem more clearly. Let me give it another go...
So, I have jiras with multiple labels and different combinations like:
Few Jiras have labels of ('Australia', 'Paris','Paris-G11', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G12', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G9', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Priority','Dev')
Few Jiras have labels of ('Europe', 'PARIS','App')
And more different labels.
I am trying to filter out jiras that have Australia and Paris in combination with other labels but do not have 'Paris-G11', Paris-G12' and so on, so that I have the list thats missing the Paris-G* labels in them. take for example from the above label combinations, I want the ones that have ('Australia', 'Paris','Priority','Dev') but not the ones that have ('Australia', 'Paris','Paris-G11', 'Priority','Dev') or ('Australia', 'Paris','Paris-G9', 'Priority','Dev').
If you notice the first first 3 sets of labels have an additional label of Paris-G* to ('Australia', 'Paris','Priority','Dev').
The query I tried based on your last suggestion was
labels in (Australia) AND labels in (Paris) labels not in (Paris-G11, Paris-G12, Paris-G9) Type != 'Tecnical task'
And I got results that included anything that had even the Paris-G* labels and there were no exclusions done. I also got the results that didnt include the technical tasks like I wanted.
Sorry for the long reply but hopefully I have explained it better for you to be able to help me out.
Also in addition to that is there a way I can filter out the lower case Paris label to the upper case PARIS label too.
Your help is much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Josh,
I apologize for causing some confusion here and for not being clear and explaining the problem more clearly. Let me give it another go...
So, I have jiras with multiple labels and different combinations like:
Few Jiras have labels of ('Australia', 'Paris','Paris-G11', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G12', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Paris-G9', 'Priority','Dev')
Few Jiras have labels of ('Australia', 'Paris','Priority','Dev')
Few Jiras have labels of ('Europe', 'PARIS','App')
And more different labels.
I am trying to filter out jiras that have Australia and Paris in combination with other labels but do not have 'Paris-G11', Paris-G12' and so on, so that I have the list thats missing the Paris-G* labels in them. take for example from the above label combinations, I want the ones that have ('Australia', 'Paris','Priority','Dev') but not the ones that have ('Australia', 'Paris','Paris-G11', 'Priority','Dev') or ('Australia', 'Paris','Paris-G9', 'Priority','Dev').
If you notice the first first 3 sets of labels have an additional label of Paris-G* to ('Australia', 'Paris','Priority','Dev').
The query I tried based on your last suggestion was
labels in (Australia) AND labels in (Paris) labels not in (Paris-G11, Paris-G12, Paris-G9) Type != 'Tecnical task'
And I got results that included anything that had even the Paris-G* labels and there were no exclusions done. I also got the results that didnt include the technical tasks like I wanted.
Sorry for the long reply but hopefully I have explained it better for you to be able to help me out.
Also in addition to that is there a way I can filter out the lower case Paris label to the upper case PARIS label too.
Your help is much appreciated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sandeep,
On my test instance, I have tickets created with the multiple issues with labels like you're stating.
Australia, Paris, Paris-G11, Houston, Blah1,Blah2,Blah3
I have one specific ticket that has both Australia and Paris as a label, as well as Blah1 and Blah2.
When I run the query:
labels in (Australia) AND labels in (Paris) AND labels NOT in (Paris-G11)
The issue with both Australia and Paris and other labels are shown, however if Paris-G11 is a label it does not show:
I have another issue in the same project that I have the labels:
Australia,G5WaGon,Paris,Paris-G11
So it has Australia and Paris, but since Paris-G11 is mentioned in the NOT it does not show.
That seems to be what you're trying to do. Is that correct?
If it is and your instance is not doing this, if you're running JIRA Server you might try a reindex.
-Josh Loe
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.