I'm attempting to use the "Total time this issue has been In Progress" script to add a field to the tickets in a specific Jira Project. After I fill out the necessary fields in the Add New Scripted Fields form, I copy the script and click the Test button. This is the error I get. Any ideas on how I can resolve this?
Error
An error occurred whilst running the scripted field.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: 1: unable to resolve class com.atlassian.jira.component.ComponentAccessor @ line 1, column 1. import com.atlassian.jira.component.ComponentAccessor ^ Script1.groovy: 2: unable to resolve class com.atlassian.jira.issue.history.ChangeItemBean @ line 2, column 1. import com.atlassian.jira.issue.history.ChangeItemBean ^ 2 errors at com.adaptavist.sr.cloud.workflow.AbstractScript.parseScript(AbstractScript.groovy:48) at com.adaptavist.sr.cloud.workflow.AbstractScript.evaluate(AbstractScript.groovy:31) at com.adaptavist.sr.cloud.events.ScriptedFieldExecution.run(ScriptedFieldExecution.groovy:30) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at TestScriptedFieldExecution1_groovyProxy.run(Unknown Source)
Thanks for your help!
Dawn
The way I've used this, label and html are functionally equivalent.
html allows you to provide the label with some formatting (to highlight the matching text for example).
After the selection is complete, the label is what you see in the field.
Note that in other screens (view screen, issue navigator) the "value" is all you can display and "value" is also used in indexing and searching. I would not attempt to use some internal ID for this.
In most cases, you will likely want "value" and "label" to be the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.