How to search Jira by labels: AND vs OR
Short answer
Jira Cloud has exactly one labels field, labels — there is no singular label. The field holds a set of values per work item, and the two ways to query several labels at once behave differently: labels in (a, b) matches an item with either label (OR), while labels = a AND labels = b matches only an item that has both (AND). Mixing these up is the single most common labels mistake in JQL.
Matching one or more labels
| Query | Result on Jira Cloud |
|---|---|
labels = bug | Valid. Items with the label "bug" among their labels. |
labels in (bug, urgent) | Valid. OR: items with "bug" or "urgent" (or both). |
labels = bug AND labels = urgent | Valid. AND: only items that carry both "bug" and "urgent". |
labels not in (wontfix) | Valid. Items that do not carry "wontfix". |
labels != bug | Valid. |
label = bug | Invalid: "Field 'label' does not exist or you do not have permission to view it." The field is always plural. |
Operators labels does not support
| Query | Result on Jira Cloud |
|---|---|
labels ~ bug | Invalid: "The operator '~' is not supported by the 'labels' field." No partial/contains match — a label is matched whole, not substring. |
labels !~ bug | Invalid, same reason. |
labels > bug | Invalid: "The operator '>' is not supported by the 'labels' field." Labels have no ordering. |
labelsCount > 0 | Invalid: "Field 'labelsCount' does not exist or you do not have permission to view it." There is no built-in label-count field. |
labels = bug ORDER BY labels ASC | Valid. Sorting parses, though with several labels per item the order is just whichever Jira picks for display, not a meaningful ranking. |
Empty, and what EMPTY actually means here
| Query | Result on Jira Cloud |
|---|---|
labels is EMPTY / labels is not EMPTY | Valid. Items with no labels at all, or with at least one. |
labels = EMPTY / labels != EMPTY | Valid too — confirmed via the parsed query structure, EMPTY here parses as the reserved keyword, not the literal text "EMPTY", so it behaves the same as IS EMPTY. Atlassian's own JQL reference documents EMPTY as usable with =/!= as well as IS/IS NOT, for any field that allows it. |
Label history cannot be searched
| Query | Result on Jira Cloud |
|---|---|
labels was "bug" | Invalid: "History searches do not support the 'labels' field." |
labels changed | Invalid, same reason. |
labels changed after -7d | Invalid, same reason. |
labels was in (bug, urgent) before -7d | Invalid, same reason. |
Fields like status support WAS/CHANGED for history (see our status history guide); labels do not. There is no JQL way to ask "which items had label X last week" — only what they are labelled right now. Jira Automation's generic "Field value changed" trigger can still watch the Labels field going forward and log or notify on a change; it just cannot answer a JQL search about the past.
Common questions
How do I find items with label A but not label B?
labels = A AND labels not in (B). Written the other way, labels != B also parses, but not in reads more clearly once you are also listing several labels to exclude.
How do I find items with no labels?
labels is EMPTY (or the equivalent labels = EMPTY).
Why did "in" give me more results than I expected?
Because in is OR, not AND. labels in (bug, urgent) returns anything tagged with either one. To require both, chain = with AND instead.
Can I search by how many labels an item has?
Not in JQL — there is no count field for labels, unlike votes which has one. You would need an app or Automation field that stores a count.