I've tried several examples that I've found for Scriptrunner but can't seem to get something to work. I want to set a validator on a sub-task with "Code review" in the summary and a user is in a project role. Some of the code I found has underlyingIssue in it but my jira doesn't seem to recognize it. I've tried this IF:
if (issue.getSummary().equals("Code review") && (groupManager.isUserInGroup(currentUser, "Dev Lead")))
and
if (projectRoleManager.isUserInProjectRole(currentUser, devProjectRole, underlyingIssue.getProjectObject()))
I'm using Script Validator (Scriptrunner) and we are using Jira 8.1.0.
Thanks for your time!
~jeff