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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.