Forums

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

Custom select list values not able to be retrieved

Jordan Hauser
Contributor
April 12, 2022

Hi all,

So I recently figured out how to update a select list fields options via scriptrunner, and got the options to be dynamically added. 

Since when I delete options, it seems to remove the value from the issue and I want to add a history for it.

So I create a script listener to copy the value to the new field whenever the issue is created/updated, and I keep seeing the error "can't get null value from field". 

Additionally, when I select an option and update the issue, the options appear on the issue as normal, but when I edit the issue, that field appears like nothing was selected. If I save the issue without picking options, the original options stayed.
------------------
I think I'm missing something when setting the options, but I'm not sure what I'm missing. Can someone that's worked on a dynamic select list script provide a little insight on how they accomplished this? The attachment is a screenshot of the portion of the script where I add options to the field. I used the api documentation found here OptionsImpl (Atlassian JIRA 7.2.8 API) along with the scriptrunner documentation for select lists Select List Conversions (adaptavist.com) to build this.


Web capture_12-4-2022_82835_jira.wilcoxind.com.jpeg

1 answer

1 accepted

0 votes
Answer accepted
Jordan Hauser
Contributor
April 12, 2022

Sorry I just referenced something wrong in the script, closing the question.

Suggest an answer

Log in or Sign up to answer