I have implemented a custom field with two checkboxes in JIRA. Now I would like to use a behaviour to set some of the checkboxes to true when an issue is created. How des the script have to look like? The documentation under the script field only shows an example for a string value, but not for checkboxes.
I tried something like this, which didn't work:
import com.atlassian.jira.ComponentManager import com.onresolve.jira.groovy.user.FormField import org.apache.log4j.Category //if (!underlyingIssue?.created) { FormField target_audience = getFieldById("customfield_11335") target_audience.setFormValue(["Checkbox A":"Yes"]) // "Checkbox A" //target_audience.setFormValue([10719]) // "Checkbox B" //}
The example for multi-selects works for checkboxes, as it mentions.
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.