Forums

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

How set the "None" option in the field with radio buttons via Groovy?

Rafael Costa
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 1, 2022

Bellow, the part of the code that I'm using to try it:

field.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(field), null), changeHolder) 

But the field keep the same value selected.

Instead "null", I already tried

  • -1
  • none
  • ""

But nothing set the option to None.

Could you help me?

1 answer

1 accepted

3 votes
Answer accepted
Anzar
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 21, 2022

Can you try this:

field.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(field), ["-1":"None"]), changeHolder) 

Regards,

Anzar 

Suggest an answer

Log in or Sign up to answer