convert script field from string to single choice select list

Michael shechter August 16, 2017

hello im using this scrip field:

import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.fields.FieldManagerimport com.atlassian.jira.issue.fields.CustomField

def CategoryCF = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Catagory_for_EazyBi") as CustomFielddef tripleValues = CategoryCF.getValue(issue)if (tripleValues == null)

{return null}

return tripleValues.toString()

how can I convert the field result as a single choice select list.

thanks.

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 17, 2017

Scripted fields are display only, they don't gather or hold data.  A select list that doesn't do anything isn't a lot of use.

What are you trying to achieve?

Michael shechter August 23, 2017

i have a script field that  show me the project category.

and i wanted to use this field in the rich filter dashboard  add-ons.  the add on support gave walkaround 

 

thanks anayway.

Tim Theis March 28, 2019

Did you ever resolve this?

I want to do the same thing - use a scripted field in the 2-dimensional dashboard gadget. The scripted field will only product 1 of 4 values.

I get Nic's point from a UI standpoint, but was hoping to do this as a workaround to resolve the dashboard issue.

Suggest an answer

Log in or Sign up to answer