How to obtain currentuser IN membersof("groupA") in JQL ?

I need to make several dashboards that show tickets to logged in users IF they are members of certain user groups.  So the same filter should return only tickets IF the logged in user belongs to one of the groups that is responsible for the tickets. 

Example filter (sorry I do not use the full correct JQL syntax, I just want to show my idea here, type is a custom field I use):

(Type = CV and currentuser IN membersof("CVowners"))

OR  (Type = JV and currentuser IN membersof("JVowners"))

OR (Type = OTHER and currentuser IN membersof("OTHERS"))   

This one filter would enable me to show only relevant tickets to the logged in user on dashboard IN CASE the user is member of the user groups that manage them. 

I do not need to make separate filters then, the user gets all the tickets that he needs to see per type if he/she is in the owning group. 

BUT the currentuser can't be used at the left side of the operator IN.  So this is not possible ?   I have the same with assignee IN membersof() and that works super !  

So I can't do this ?  Any other idea to do the same ? 

Thanks !

1 answer

0 vote

Hi Kristof,

That is correct.  The currentuser() supports the Assignee, Reporter, Voter, Watcher and  custom fields of type User fields.

The following are unsupported operators:

    ~ , !~ , > , >= , < , <= IS , IS NOT , IN , NOT IN , WAS , WAS IN , WAS NOT , WAS NOT IN , CHANGED

I did some research and found a Communities post that may help you.  The suggestion was to use ScriptRunner or to use SQL.  Take a look at the post by Vasiliy Zverev and see if you can perhaps modify it to fit your needs.

Cheers,

Branden

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted Mar 28, 2018 in Jira Software

Can a company’s culture make or break agile adoption?

Can a new-to-agile team survive and thrive in a non-agile culture? If so, what advice would you give to those trying to be agile in a non-agile culture? What's the key(s) to success? Share your thoug...

13,602 views 16 15
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you