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
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?