Forums

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

Show a list of issues depending on the currentUser's groups

Nuno Lopes
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 9, 2023

I need to create a JQL script (and we have ScriptRunner) to show issues to the logged user according to the user group he belongs to. Something like:

  • If currentUser() belongs to group A, then show him issues with component = CA
  • If currentUser() belongs to group B, then show him issues with component = CB
  • otherwise show him all issues from the project

I tried doing this, but was not able to. 

Even tried. suggestion from chatGPT :D but it didn't work. The suggestion was: 

project = ABC AND issueFunction in membersOf("A") and component = CA or project = ABC AND issueFunction in membersOf("CB") or project = ABC

The thing is that this should check if the current user belongs to this group, but it doesn't: 

issueFunction in membersOf("A")

Is there any way to do this, without having to create a groovy script in ScriptRunner?

1 answer

0 votes
Kris Dewachter
Community Champion
October 11, 2023

Hi @Nuno Lopes ,

Can you try this JQL ?

assignee in membersOf("A") and component = CA

 

Best regards,

Kris

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events