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()
I am trying to read the value from priority field for my comparison statement and for next step of operation. By using above method, I am not able to get the value "low, Medium, etc". Results shows me bigger string with all values.
IssueConstantImpl[[GenericEntity:Priority][sequence,4][statusColor,#0065ff][name,Low][iconurl,/images/icons/priorities/low.png][description,Minor problem or easily worked around.][id,4]]
Can you suggest me a way around?
Since our last roundup in April, Atlassian's Marketplace Partners have added over 100 new cloud apps to the Atlassian Marketplace to help your teams work more efficiently. Let’s take a quick look a...
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