Script Validator (Condition) : check if user is in group

Lukasz Grobelny
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.
April 27, 2023

Hi guys, 

 

I'm stuck at something incredibly stupid. I'm creating a script listener, that is checking if the user is in a group. 

Line for the condition:

user.groups.includes("2nd Line")

 

And it's working for default group like jira-software-users, but if I'm adding any custom group it's always giving me FALSE as a result. Any ideas what is wrong?

1 answer

1 accepted

1 vote
Answer accepted
Lukasz Grobelny
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.
April 27, 2023

OK, if anyone is looking for this, the correct one is

issue.assignee.groups.includes("Group Name")

Thomas May 30, 2023

Thanks! I used it at my work.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events