Search syntax for text fields (exclude)

Klara Stursova August 30, 2022

Hello,

I would need to exclude all tickets containing the text "UAT" from the search. So I need to find the opposite of the ~ sign. I searched this help but everything I tried didn't work.

Result 1: List of valid operators.

Snímek obrazovky 2022-08-30 092043.png

Result 2: Operator not supported by field "text"

JIRa 1.png

Do you have any advice about this?

Thank you

Klara

 

3 answers

2 accepted

2 votes
Answer accepted
Rigo Ewen August 30, 2022

Hi Klara and welcome to the community,

you could try to create a filter with "text ~ UAT", save it and then use it like "filter not in ("filtername")

as described here:

https://community.atlassian.com/t5/Jira-Core-Server-questions/Search-for-issues-that-do-not-contain-text/qaq-p/455633

Klara Stursova August 30, 2022

Thank you Rigo! This answer helped me solve the problem.

Like Rigo Ewen likes this
1 vote
Answer accepted
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 30, 2022

Welcome to the Atlassian Community!

I'm afraid there's no direct way to do this.  The ! operator is a negative search, which are hard to do, and incredibly resource intensive, so it can only be used to negate the more simple searches.  With a negative search, you have to build a list of all the possible results and then subtract any you find that match the positive part of the search.  It's not quick.

You could however set up a system that would enable something like your search.

Run a filter for simply "text ~ UAT".  Use bulk-edit to add the label "UAT" to them all.  Now you can run:

resolution = unresolved and (labels not in ("UAT") or labels is empty)

You will probably want to automate updates too - maybe run the search for UAT regularly, adding and removing the label if it has changed.

Klara Stursova August 30, 2022

Hello Nic, thank you for the suggestion. As I am not owner of the JIRA tickets, I cannot add labels to the tickets. Otherwise this will indeed be possbile a solution.

0 votes
Hannes Obweger - JXL for Jira
Atlassian Partner
August 30, 2022

Hi @Klara Stursova

welcome to the community!

If you're open to solutions from the Atlassian Marketplace, this would also work easily in the app that my team is working on, JXL for Jira.

JXL is a full-fledged table/spreadsheet view that allows viewing, inline-editing, sorting and filtering by all your issue fields. As text filtering in JXL uses a different technology than JQL, you can perform logical combinations of search terms, including NOT.

This is how this looks in action:

logical-text-filtering.gif

I'm showing only a small data set here but this works for any number of issues. Once you've narrowed down your set of issues, you can work on them directly in JXL, trigger various Jira operations, or export them for further processing.

Hope this helps,

Best,

Hannes

Suggest an answer

Log in or Sign up to answer