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 votes
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 Oct 09, 2018 in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

372 views 6 0
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