I have the following script which is store in a file named SlackUser.groovy
import static groovy.json.JsonOutput.*
import static groovyx.net.http.ContentType.*
import static groovyx.net.http.Method.*
//Field defienition constant to be read from issue
String emailFieldName="Email Address" //10523
public String emailFieldValue=""
emailFieldValue=refIssue.getCustomFieldValue(emailField) <<< error
Then I am calling that script from my Script console as below :
SlackUser slk=new SlackUser(refIssue)
When the SlackUser object is created, I get a wierd error in the BOLD line above saying :
"groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.IssueImpl.getCustomFieldValue() is applicable for argument types: (java.lang.String) values: [Email Address] Possible solutions: getCustomFieldValue(com.atlassian.jira.issue.fields.CustomField), setCustomFieldValue(com.atlassian.jira.issue.fields.CustomField, java.lang.Object) at ServiceRequest.SlackUser.<init>(SlackUser.groovy:53) at Script564.run(Script564.groovy:71)"
What is wrong and how to solve that error ?
For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events