It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA Saved Filters Lose Their Boolean Groupings

Terry Aney Nov 14, 2014

I'm trying to save a filter as the following:

(status in ("To Do", "In Progress", "Publish To Live") AND (assignee = currentUser() OR assignee = btr.users)) OR (status in (Review) AND reporter = currentUser())

After clicking save, the filter/jql remains correct, but if I leave the page and come back to the filter definition, it loses the parenthesis and presummably changes the results/meaning of the query.  After coming back, the filter looks like this:

status in ("To Do", "In Progress", "Publish To Live") AND (assignee = currentUser() OR assignee = btr.users) OR status in (Review) AND reporter = currentUser()

Any advice on how to preserve the filters would be greatly appreciated.

3 answers

1 accepted

1 vote
Answer accepted
JamieA Nov 14, 2014

> and presummably changes the results/meaning of the query

But does it? As a quick check you can just see if the same number of issues are returned for both queries.

If they are different, looks like https://jira.atlassian.com/browse/JRA-39107.

 

Terry Aney Nov 14, 2014

Think you are right...answering myself below but giving you credit.

0 votes
Eric Mathiasen Nov 14, 2014

I've seen this, too. I don't have a solution, but just wanted to pile on to say I've experienced this problem as well.

0 votes
Terry Aney Nov 17, 2014

I think I might have just panicked at first look, but from my quick batch of tests, both of the following always behave the same (correctly).

 

var toDo = false;
var assignEE = false;
var toReview = false;
var reporter = true;
( ( toDo && assignEE ) || ( toReview && reporter ) ).Dump();
( toDo && assignEE || toReview && reporter ).Dump();
JamieA Nov 17, 2014

Now I'm really confused. What you've posted there is about operator precedence, and yes generally AND is higher than OR. But that's nothing to do with JQL, which the docs say is parsed L to R. What is this code exactly?

Terry Aney Nov 18, 2014

Well, this is just showing that my conditions evaluate to the same regardless of the nested parenthesis. So, I guess I'm saying/hoping that there isn't a problem with JQL in terms of not keeping nested parens, but rather it was 'smart enough' to realize they weren't needed and just saved appropriate query. Hopefully JQL isn't simply L to R and does obey order of operations correctly... - PS, this 2 comments per 24 hour limit force by JIRA is hard to work with ;)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira

Try Jira Cloud for Outlook: Organize your work without leaving your inbox

Hi Atlassian community, My name is Max and I work on the product integration team at Atlassian. I am pleased to announce the early access program for the Jira Cloud add-in for Outlook. This add-in...

2,708 views 6 15
Read article

Community Events

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

Events near you