I want to locate tickets that have a specific list selection. The tickets MUST have the exact configuration (so only one value match is not sufficient).
e.g. we have a custom field of type list named "platform", with 100 options (option1, option2, option3, ..)
I like to return all issues with
project = TEST AND issuetype = Bug AND platform = (option11, option61, option99)
When I use the = operator, I get the following error:
Operator '=' does not support the list value '("option11", "option61", "option99")' for field 'platform'.
What is the right syntax to return issues with the exact queried list configuration?
Use the “in” operator…
project = TEST AND issuetype = Bug AND platform in (option11, option61, option99)
This also returns:
(option11, option61)
(option11)
The tickets MUST have the exact configuration (so only one value match is not sufficient).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
project = TEST AND issuetype = Bug AND platform = option11 and platform = option61 and platform = option99
however, this will not exclude issues that also include additional platform values. There isn’t an “only =“ function.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to what Jack suggests: How often do you need to perform this query?
If you need it once, you could brute force it, by adding a clause to exclude all of the other options:
... AND platform NOT IN (option1, option2, ...)
Or, export to a spreadsheet to prune the list by option count.
If you instead need this often, you could investigate the marketplace for JQL addon apps which support such query syntax, or you could build an automation rule to do this. (Such a rule would perform your query, and then check for issues with a count of options exactly equal to 3. I've never built such a rule but I suspect it is possible.)
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for trying Jack but you either misread/misunderstand my question :)
Thanks Bill, seems indeed that I need to find an alternative method as this not supported (I need to run it often as part of dashboard filters.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Lucas,
As you need this often, you could still do this by adding a custom field and using an automation rule. For example, create a custom field which contains the concatenated list of options, updated at issue create (or field change). Your JQL could then check for an *exact* match for dashboard display:
project = TEST
AND issuetype = Bug
AND "Platforms Selected" = "option11, option61, option99"
The smart value to set your code would be something like:
{{issue.platform.name.join(", ")}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If the options follow a pattern, you may find our regex JQL function handy to filter out issues with additional options. It's part of JQL Search Extensions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.