Hi ,
I'm trying to create a script custom field,
I tried to run a groovy script for this custom field but it's not running,
I have created the groovy script with JMWE Consol (Jira misc workflow extensions),
the script was compiled well without any error,
but when I tried to execute it in ScriptRunner custom field, I got the following error :
groovy.lang.MissingMethodException: No signature of method: com.atlassian.jira.issue.IssueImpl.get() is applicable for argument types: (java.lang.String) values: [customfield_15902] Possible solutions: getAt(java.lang.String), getId(), grep(), grep(java.lang.Object), wait(), getKey() at Script91.run(Script91.groovy:19)
my question is why there a difference between the ScriptRunner custom field and Groovy custom field? is it a different type of code?
is anyone familiar with this kind of issues?
The add-ons provide different frameworks for hooking into the data you're working with.
In a Scriptrunner scripted field, you don't need to mess around with issueimpls or building issue structures, and you don't need to do much with custom fields - the issue object is immediately available along with all its imports.
def fieldValue = issue.getCustomFieldValue(customField)
does the job without imports.
Hi Nic,
So you basically saying that the only difference between those types is the custom filed definition? issue.get("customField") vs issue.getCustomFieldValue(customField)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, JMWE and JMCF offer a simplified API for accessing Jira data. There are plenty of examples on the internet and in the documentation for accessing issue fields in ScriptRunner.
By the way, you can also check out the JMCF app to create calculated (scripted) custom fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.