I have a custom field single select list named 'Root Cause'. When I reopen an issue, then I want the value for 'Root Cause' to be cleared. I read through the Scriptrunner Set Issue Attributes documentation and while it provides code for text, date, user picker, system fields, checkboxes, and radio buttons I can't figure out how to do it for single select. I appreciate your help.
Hi Suzanne,
Try something like this:
import com.atlassian.jira.component.ComponentAccessor
def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Root Cause")
issue.setCustomFieldValue(cf, null)
Thanks so much Ivan, that worked perfectly. I really appreciate the help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Glad I could help! Please mark this solution as "Accepted" if it resolved your issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.