Forums

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

Can we create picklist/drop down custom filed by using scriptrunner plugin

Sreenivas Narala March 30, 2022

Hi Team,

We need to list all project names and need to display same in Dashboard/Work ID screen as picklist/drop down custom file.

Here am able to get all project names as a single string by using scriptrunner plugin but want to display project names as list through picklist/dropdown.

Could you please help me to achieve this requirement.    

1 answer

0 votes
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.
March 30, 2022

You can't create new custom field types with Scriptrunner, only scripted fields.

Have you not tried the built-in "project picker" field?

Sreenivas Narala March 30, 2022

Thanks Nic, But want to get all project details like project name, key project type by using REST API.

As of now getting all project details by using below code and getting output as a single line text but want to display output as a picklist/dropdown list.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project
def prList = ComponentAccessor.getProjectManager().getProjectObjects().name

For this requirement am trying with Custom picker but not able to publish project names in drop down, Could you check and let us know better solution. 

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.
April 2, 2022

I don't think this is a simple field you can generate with code within SR, you're asking to select one thing while displaying another.

I think you'll need to write an app to do this.

Sreenivas Narala April 3, 2022

Thanks for the info Nic, if possible could you share any suitable tool/plugin for my requirement. 

 

Currently we are using two different versions of Scriptrunner plugin(Pre-Prod : 6.41.0, PROD : 6.47.0) and we are able to use the Custom Picker function in Pre PROD but same function not available in PROD, Could you please suggest how we can overcome this issue.

Thank you in advance! 

Suggest an answer

Log in or Sign up to answer