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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.