Greetings dear Community,
Using JIRA 4.4.1 and Script Runner (GroovyRunner) 2.0.7, I'm trying to add a Script validator (only with conditions and not a whole script) in my workflow.
This script will check the value of a customfield (TextField < 255) where we put a user name, and see if this value match one in a user group (jira-users).
For now, I was able to extract the value, but encounter some difficulties to check if there is a match in the user group.
Here is the condition I wrote to extract the customfield value :
(customFieldManager.getCustomFieldObject("customfield_13100").getValue(issue))
and here is the function I wrote (but unfortunately doesn't work) :
issue.cfValues['my customfield'].inGroup("jira-users") == true
(error message :
MissingPropertyException: No such property: cfValues for class: com.atlassian.jira.issue.IssueImpl)
or
issue.(customFieldManager.getCustomFieldObject("customfield_13100").getValue(issue)).inGroup("jira-users")
(error message :
MissingPropertyException: No such property: name of the user in the CF for class: com.atlassian.jira.issue.IssueImpl)
Can you tell me what am I missing, at this point (I guess it's obivious, but because I'm a beginner, can't really see what's wrong)
Thanks for your help.
Best Regards
F.