I just need a validator script for a transition. I'd like a validator for when an assignee has to be in a certain project role.
I found this code:
ComponentManager componentManager = ComponentManager.getInstance()
ProjectRoleManager projectRoleManager = ComponentManager.getComponentInstanceOfType(ProjectRoleManager.class) as ProjectRoleManager
ProjectRole devRole = projectRoleManager.getProjectRole("Lead Software Developer")
projectRoleManager.isUserInProjectRole(issue.assignee, devRole, issue.projectObject)
But I dont think it will be future-compatible with JIRA 7. I'm currently on 6.4.11.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG