Hi there,
how can I get the current value of an custom field beeing converted to a single select by an scriptrunner behaviour eg.?
getFieldById("customfield_11002").convertToSingleSelect(...)
The selectbox is successfully renderd in the transition form. If the selection changes (like client JavaScript OnChange) I want to react on the new selection and set the values of the remaining form (custom) fields regarding to some logic (similar to cascading selectboxes).
Is this possible using behaviours?
I've tried something similar to this which is for sure only giving my the "serverside" value, saved for the issue, not the current selected value (clientside)
import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.issue.Issue
@BaseScript FieldBehaviours fieldBehaviours
// Den Wert der Custom Field Selectbox auslesen
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def vorgangstypSelect = customFieldManager.getCustomFieldObject(getFieldChanged())
def vorgangstypValue = underlyingIssue.getCustomFieldValue(vorgangstypSelect) as String
log.error "### vorgangstypValue: " + vorgangstypValue
If not am I able to inject some JavaScript using ScriptRunner?
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.