Forums

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

filter syntax for currentUser() in a list field

Alexander Reum February 21, 2018

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
Kurt Klinner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 21, 2018

@Alexander Reum

 

Hi Alex

 

did you try

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

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

 

Cheers

Kurt

LarryBrock
Community Champion
February 21, 2018

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

~~Larry Brock

Alexander Reum February 22, 2018

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

Kurt Klinner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 22, 2018

@Alexander Reum

Glad that it worked :-)

Parth Bharadiya August 17, 2022

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
TAGS
AUG Leaders

Atlassian Community Events