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

This widget could not be displayed.

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.

This widget could not be displayed.
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
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

194 views 1 3
Join discussion

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