Is the sequence of requests important in a JQL filter?
@Ivan Andrieiev ,
The only thing that is really important is your usage of operators.
As long as your make sure your AND and OR's are correctly done (with brackets or not) the order of the statements does not matter.
What do you mean by "sequence of requests"?
If you mean the order of the clauses and joins that you put into the question, then yes, it is important.
"A or B and C" is not the same as "A and B or C", nor "C or B and A"
When Jira is given unclear queries like those, it simply reads them left to right, so the order of clauses and joins matters.
@Nic Brough -Adaptavist- @Dirk Ronsmans Hi
If I have "or" in my request, then it applies further conditions only to the part after "or"?For example, A and B and C or D and A and B.That is, condition A and B and C will be fulfilled, if there are no corresponding signs, then it will go to condition D and check condition A and B again?
No, without any grouping statements (using parentheses to explain the question logically), Jira, like all other standard compound search functions, just has to read left-to-right.
I'm going to simplify the writing down a bit, just to keep it short and readable, but I want to be clear on what I am doing here. We've been using phrases like "A and B", but the A and B are not really JQL. I want to be clear that A and B are shortened versions of JQL clauses like "priority = high" or "resolution is empty" - they will simply return a true or false for each issue.
There's no going back and looking at previous clauses, it simply joins what it has selected to the new clause with the and or or it finds next.
If your clauses are all joined with or OR and, then you have no problem - "A or B or C or D" can be written in English as "show me issues where A, B, C or D are true". With "and", it comes out as "show me issues where All four conditions are true"
Your query of "A and B and C or D and A and B" can be simplified to "A and B". This is because the first part of it "A and B and C" does what you expect, then the "Or D" adds issues matching D, but then "and A and B" requires the list to have A and B, as you read it left-to-right.
TLDR: use parenthesis to make it clear.
Never write "A and B or C" vs "A or B and C", even if reading left to right works for what you want the query to do. Be clear for your other humans - "A and (B or C)" or "(A and or C" do not need any thought to understand!
@Nic Brough -Adaptavist-
To simplify my questions, I came up with A or B. In this case, A (project status sprint) B (project status next sprint). If at least one condition in A is false, will it go to check B? Did I understand correctly?
It looks like you're new here. Sign in or register to get started.