A hopefully simple question, how do I get the selected value in a Select List as a String in a behaviour server-side script?
def Field = getFieldById("customfield_nnnnn").getValue() returns an array but I would like to get it as a String to use further on in a select list conversion JQL.
Thanks in advance!
you should be able to call .toString() on the end of your .getValue() which will convert it to a string.
Heres an example of mine that works:
@BaseScript FieldBehaviours fieldBehaviours
FormField field = getFieldById(getFieldChanged())
def description = getFieldById("Description")
def ragO = getFieldByName("customFieldName")
def ragV = ragO.getValue()
def ragS = ragV.toString()
It’s very important to have access to the workflow process from anywhere. Especially if you manage the work of others. There is no difference whether you’re out of office, or drive a ca...
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