Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,369,540
Community Members
 
Community Events
168
Community Groups

filter syntax for currentUser() in a list field

Edited

Hi,

in my jira (7.6.1) I have a custom field called "Co-Assignees". It is a multi-user picker that an author can use for adding assistants to a task.

I'd like to define a filter that gets me all issues where the current user is either the assignee or a co-assignee. Unfortunately the following doesn't seem to work:

assignee = currentUser() OR currentUser() IN Co-Assignees ORDER BY priority DESC, updated DESC

It seems that the IN operator does not accept a function as left operand. Is that right or am I doing something wrong? Is there an alternative way?

Thanks in advance for your help.

Alex

1 answer

1 accepted

3 votes
Answer accepted

@Alexander Reum

 

Hi Alex

 

did you try

assignee = currentUser() or <CUSTOMFIELD>  in (currentUser())

assignee = currentUser() OR Co-Assignees in (currentUser()) ...

 

Cheers

Kurt

LarryBrock Community Leader Feb 21, 2018

I know it sounds slightly backward but I agree with @Kurt Klinner that this is the right syntax.

~~Larry Brock

Dear Kurt and Larry,

thank you for your help. It works perfectly. Actually I did try to swap the operands, because I saw it elsewhere, but it didn't work because I omitted the parentheses around currentUser().

So, if I interpret your solution right, we're making a 1-element list out of currentUser() and look for an intersection with Co-Assignees? Atlassian's JQL documentation should really mention that capability of the IN operator.

Alex

@Alexander Reum

Glad that it worked :-)

Not working for me. It says below error.

 

An option provided by the function 'currentUser' for the field 'Developer[Select List (multiple choices)]' does not exist.

Suggest an answer

Log in or Sign up to answer