Hello,
I wanted to validate user's group while creating issue. We have a field GROUP which is in user property. I wanted to allow create issue permission to one particular group of users.
I have a user property named GROUP with values G1,G2,G3,G4. Only G1 users can create issues. I wanted to restrict create issue access to other GROUP users.
I tried to add validator in Create transition using following script but no luck :
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.UserPropertyManager
UserPropertyManager userPropertyManager = ComponentAccessor.getUserPropertyManager()
if (issue.reporter) {
userPropertyManager.getPropertySet("GROUP") != 'G1'
}
How can I achieve this?
Thanks in advance.
Hello Rajeswari.
You can check out this answer from the community.
In it you will see the proper way of accessing user properties.
Do not hessitate if you have anymore questions.
Cheers!
Dyelamos
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.