I'm trying to use a JQL Query Filter to display subtasks for specific users in my Scrum Board. For tasks I want to look at the 'Assignee' field but for stories, I want to refer to the 'QA' field (which is a custom field). So, I'm creating a query like:
project = DEV AND ((type = Story AND QA = user1) OR (type in (Defect, Development, QA, Sub-task) AND assignee = user1)).
I save the query and I see some results but they don't look right so I try to go back to the query filter and see the query. I see that it has been changed to:
project = DEV AND (type = Story AND QA = user1 OR type in (Defect, Development, QA, Sub-task) AND assignee = user1)
You will notice that JIRA has removed one pair of outer brackets. So, a query like ((A AND B) OR (C AND D)) is being changed to A AND B OR C AND D. I'll have to write out the truth table to confirm but I believe that these two queries will not produce the same results. Can somebody from Atlassian please review this and respond?
Hi @Swaroop Rao
If you want someone from Atlassian to review this, you may need to raise a support ticket, but i would probably confirm via a truth table that it isn't working first.
My question is - if you have the query set up, with all brackets as you want them, before saving, what happens if you run the query? Do you get the expected results? Or does it automatically remove brackets, even without saving?
I tried a query with the same structure of brackets and ANDs and ORs, but prior to saving it ran and didn't remove brackets (returned 2471 rows). I then saved it and it removed both sets of inner brackets, but still returned 2471 rows.
You can follow this issue: https://jira.atlassian.com/browse/JRASERVER-39107
The results should not vary though but Jira does remove nested parenthesis. It is annoying to read your own JQL after few weeks and understand the logic.
Try creating filters for your sub queries and use it in the JQL like filter = "filter 1" AND filter = "filter 2". It will improve the readability.
I created the truth table for both queries and I DO see differences in the results. I'm pasting a screenshot of the truth table. Unless there's something else I'm missing here, I think Atlassian should review this functionality and ensure that it preserves the brackets exactly as the user specified them.
Learn how to use two new reports for next-gen projects in Jira Cloud: Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events