Dynamic Form Select List option using loop

Krishnanand Nayak
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.
July 13, 2020

Currently in the SR4J Dynamic forms there is no option to create a Select List of the Issue Statuses.

We are trying to create a Select List   (https://scriptrunner.adaptavist.com/latest/jira/dynamic-forms.html#_select_list) but instead of hard coding the options we want to add values that are retrieved using the following code:

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.StatusManager

StatusManager statusManager = ComponentAccessor.getComponentOfType(StatusManager.class)
return statusManager.getStatuses()*.getName()

 

is this possible? If yes, how can this be implemented. 

1 answer

1 accepted

0 votes
Answer accepted
Michel Tremblay [Adaptavist] July 16, 2020

Sadly I don't think @select have the option to do what you need. 

The only solution I think would be to add a new annotation to do what you are looking for. 

Maybe this could be done through creating a new script plugin, but that would need more investigation. 

 

Good luck in your search. 

Krishnanand Nayak
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.
July 17, 2020

ouch that sucks ...wonder if its the product backlog for SR4J

Michel Tremblay [Adaptavist] July 17, 2020

I would strongly suggest you create a feature request for this in our support site. 

https://productsupport.adaptavist.com/servicedesk/customer/portal/2

Suggest an answer

Log in or Sign up to answer