Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

query intersect

Miika_Mäkelä April 16, 2020

Hi, I am stuck on something seemingly simple.

I want to filter tickets, where I am a watcher, but I am not assignee, nor am I a "Multiple assignee". It's possible that either of the assignee fields could be null - so it seem that should be considered as it does effect the results I get.

This query below is indeed to broad. It includes tasks where I am as a "multiple assignee"

watcher = currentUser() AND (Assignee != currentUser() OR "Multiple Assignees" != currentUser())

Any suggestions are appreciated!

 

2 answers

1 accepted

0 votes
Answer accepted
Miika_Mäkelä April 17, 2020

I received a solution to this internally from our organization. It was indeed a bit tricky due to the "Multiple Assignee" custom field.

"...as Multiple Assignee is used for few projects only so any query with it will work against only these few projects, all the rest will not be taken into account.

That’s why switching OR to AND will return only few tickets from projects that have Multiple Assignee configured.

As a workaround I have created a public filter “usesMultipeAsigneeField” to match tickets that have this field configured or not.

So the query that will work for you is:

watcher = currentUser() and assignee != currentUser() and (not filter = "usesMultipleAssigneesField" or "Multiple Assignees" != currentUser() or "Multiple Assignees" is EMPTY) "

0 votes
Jack Brickey
Community Champion
April 16, 2020

So it appears that you have created a custom field "Multiple Assignees". What type of field is this? I suspect it is a multi-select and not a user-picker in which case currentuser() will not work.

If so then you would need o personalize this away from currentuser()...

watcher = currentUser() AND (Assignee != currentUser() OR "Multiple Assignees" != xxxxx)

where xxxxx is a specific user/value in the multiple assignees field.

actually you may really need to change your logic to this depending on your actual goal...

watcher = currentUser() AND (Assignee != currentUser() AND "Multiple Assignees" != xxxxx)

Miika_Mäkelä April 16, 2020

Multiple Assignees is a field that can contain - as the name implies - several assigned users.

I just tried the query: "Multiple Assignees" = currentUser() and it does find correctly all tickets, where I am listed as one of the multiple assignees. So this does not yet seem to be the blocker.

Suggest an answer

Log in or Sign up to answer