On all versions of the help document for JIRA "Search syntax for text fields" https://confluence.atlassian.com/jirasoftwarecloud/search-syntax-for-text-fields-764478343.html it says
Query terms
A query is broken up into terms and operators. There are two types of terms: single terms (e.g. "hello") and phrases (e.g. "hello dolly"). Query terms in Jira are not case-sensitive. Multiple terms can be combined together with Boolean operators to form a more complex query (see below). If you combine multiple terms without specifying any Boolean operators, they will be joined using AND operators.
But then later says:
OR
The OR operator is the default conjunction operator. This means that if there is no Boolean operator between two terms, the OR operator is used. The OR operator links two terms, and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.
So which is it supposed to be?
I was trying with this query:
summary ~ "moves (CMR OR CMRS OR Morning Report)"
and it got treated like
summary ~ "moves AND CMR OR moves AND CMRS OR moves AND Morning OR moves AND Report"
summary ~ "moves AND (CMR OR moves) AND (CMRS OR moves) AND (Morning OR moves) AND Report"
Whereas when I tried:
summary ~ "moves (CMR OR CMRS OR Morning OR Report)"
It got treated like this:
summary ~ "(moves AND CMR) OR (moves AND CMRS) OR (moves AND Morning) OR (moves AND Report)"
Which is what I wanted.
The point is, sometimes the (space) is behaving like an AND, and sometimes like an OR (within parentheses, it is an OR, but when joining parentheses, it is an AND)
Also, the grouping behaves strangely in the text field search, it did OR grouping in
summary ~ "moves AND CMR OR moves AND CMRS OR moves AND Morning OR moves AND Report"
but in JQL
status=resolved AND project="Teams in Space" OR assignee=captainjoe
it does AND grouping
(status=resolved AND project="Teams in Space") OR assignee=captainjoe
but to be honest I get just strange behaviour when I use ANDs and ORs without parentheses.
These give the same results
(CMR OR CMRS) AND moves
moves AND (CMR OR CMRS)
These return different results
CMR OR CMRS AND moves
returns 1 result and acted like "CMRS AND moves"
moves AND CMR OR CMRS
returns 1681 results and acted like "CMR OR (moves AND CMRS)"
I feel like the grouping for text fields and the default boolean (AND outside of or if there are no parentheses, and OR inside parentheses) should be clarified on https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-764478330.html or just specify to always use parentheses when using AND and OR.
I use JIRA 7.1.3 https://confluence.atlassian.com/jirasoftwareserver0713/advanced-searching-965542847.html