how to use NOT in a search

Russell Bateman August 10, 2016

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 10, 2016

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
Kian Stack Mumo Systems
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 10, 2016
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