Forums

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

How to populate the value of a custom Checkbox field using Script Runner

Payal Gogia
June 3, 2021

I want to populate the value of the Custom Field Checkbox using ScriptRunner. I got the solution for doing the same for Jira server but not getting any hint for Jira cloud. From API or other given examples, I am able to set the value of Checkbox (any value from the default list) but not able to add new values in the Checkbox List.

 

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Douglas Johnson
April 22, 2021

Paddy, 

I received some assistance from @PD Sheehan for my question How to copy collection (select, multiselect, radio) values into sub-task(s) within a post-function?

Although my script was for a post-function, the following might be helpful.

// Single select
addCustomFieldValue(inquiryTypeField.id, inquiryTypeValue.optionId as String[]
// Multiselect
addCustomFieldValue(inquiryTypeField.id, inquiryTypeValue*.optionId as String[]

I don't know if this is considered cross-posting, but I spent so much time trying to figure this out, it should be OK include the solution here as well, IMHO.

TAGS
AUG Leaders

Atlassian Community Events