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 Join to answer
Community showcase
Emilee Spencer
Published yesterday in Marketplace Apps

Marketplace Spotlight: DeepAffects

Hello Atlassian Community! My name is Emilee, and I’m a Product Marketing Manager for the Marketplace team. Starting with this post, I'm kicking off a monthly series of Spotlights to highlight Ma...

44 views 0 3
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot