how to use NOT in a search

This question is in reference to Atlassian Documentation: Advanced searching

Rather than merely referring to the operator NOT, perhaps give an actual syntactic example of it used.

I have some JIRA issues that are in workflow="to test". I want all issues except those. I have tried:

project = "ETL" and NOT workflow = "to test"

but get no results (and there should be many). What am I doing wrong?


2 answers

2 votes

It's often clearer to think of it as a simple inversion of the following clause.  "Show me black cats" vs "Show me cats that are not black"

The usual bit that people trip over with "not" is not the inversion but the standard failure to realise that simple "yes or no" questions have three answers, not two - yes, no, and no answer.

Try the following searches

  • workflow = "to test"
  • not workflow = "to test"
  • workflow is empty

This assumes of course, that your workflow custom field is a simple data field, a select list or variation on that.

0 vote
This is what the documentation says about "NOT"
  • joins two or more clauses together to form a complex JQL query
  • alters the logic of one or more clauses
  • alters the logic of operators
  • has an explicit definition in a JQL query
  • performs a specific function that alters the results of a JQL query.

For example, if I had the query "NOT project = test" it would return everything outside of the query "project = test" (which would be all issues in project != test). It essentially can be used to return everything outside of a query as the result of a search.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published Monday in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

511 views 8 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you