I have a custom filter written in JQL with several consecutive AND statements combined with != due to the required field to search does not support list use like (A,B,C).
I need to add another AND condition but that condition must also contain another AND operator. Something like:
... AND (component != R AND type != S) AND...
The above is for reference to what I'm trying and is not valid JQL.
Is this possible?
Can you post the whole JQL? Nested segments and all. Feel free to obscure field names/values.
Also is there more to the error for invalid JQL?
status = Open AND component in ("A", "B", "C", "D", "E", "F", "G", "H", "I") AND cf[11802] != CUSTOMER1 AND cf[11802] != " CUSTOMER2" AND cf[11802] != " CUSTOMER3" AND cf[11802] != " CUSTOMER4" AND cf[11802] != " CUSTOMER5" AND cf[11802] != " CUSTOMER6" AND cf[11802] != " CUSTOMER7" AND cf[11802] != " CUSTOMER8" AND cf[11802] != " CUSTOMER9" AND cf[11802] != " CUSTOMER10" AND cf[11802] != " CUSTOMER11" AND cf[11802] != " CUSTOMER12" AND cf[11802] != " CUSTOMER13" ORDER BY created DESC, key DESC
I need to add an “AND not equal” for something that will look at cf[11802] AND another custom filed for TYPE of certain criteria and not display those.
The error you recieve when trying to do "cf[11802] != (A,B,C,D,etc.) is that the field does not support list values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What type of custom field is it for this part:
cf[11802] != (A,B,C,D,etc.)
You might be need the Not In () operator if you're using a select field or similar and want to exclude several options.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
it is a Select List (Single Choice) Field of Global Type
as note, the second custom field I'm looking to combine with "Customer14" is also a Select List (Single Choice) Field of Global Type
was that the right answer?
Also, I only want to address the second field (which does appear on all other tickets) for Customer 14. If I try to add another operator for the second custom field, it eliminates ones for customers I want to see.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So could you accomplish this using:
(cf[11802] not in ("Customer1", "Customer2", "Customer3", ....) and status = Open AND component in ("A", "B", "C", "D", "E", "F", "G", "H", "I")) OR (cf[11902] = "Customer14" and cf[99999] = "abcdef") order by created desc, key desc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It was pretty close, I added an AND status = OPEN statement to the CUSTOMER14 section after the OR statement, and that reduced the display a bit as well.
Also, I made sure to include the CUSTOMER14 name in the first statement for "not equals", then also used CUSTOMER14 after the OR statement to say to include that customer name with the AND for priority, and it worked!
THANK YOU SO MUCH!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happy to help 😀
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is the final JQL:
cf[11802] not in (CUSTOMER1, CUSTOMER2, CUSTOMER3, CUSTOMER4, CUSTOMER5, CUSTOMER6, CUSTOMER7, CUSTOMER8, CUSTOMER9, CUSTOMER10, CUSTOMER11, CUSTOMER12, CUSTOMER13, CUSTOMER14) AND status = Open AND component in(A, B, C, D, E, F, G, H, I) OR cf[11802] = CUSTOMER 14 AND priority = “P1” AND status = Open ORDER BY created DESC, key DESC
"hi5"
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.