Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
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
Contributor
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