Hi folks,
I'm trying to set a checkbox through scriptrunner at creation of a subtask and when the parent is a specific ticlet type.
Here follows what I wrote in the listener. the triggering Event is "issue creation"
import com.atlassian.jira.component.ComponentAccessor
import org.apache.log4j.Level
import com.atlassian.jira.issue.ModifiedValue
import com.atlassian.jira.issue.util.DefaultIssueChangeHolder
import com.atlassian.jira.issue.IssueFieldConstants
import com.atlassian.jira.issue.fields.FieldManager
import com.atlassian.jira.issue.CustomFieldManager;
def customFieldManager = ComponentAccessor.customFieldManager
def optionsManager = ComponentAccessor.optionsManager
def issueManager = ComponentAccessor.issueManager
def currentIssue = event.issue
def customField = customFieldManager.getCustomFieldObjectsByName("Richiesta Formazione")[0]
def fieldConfig = customField.getRelevantConfig(currentIssue)
def options = optionsManager.getOptions(fieldConfig)
def optionsToSet = options.findAll { it.value in ["SI"]}
def parent = event.issue.getParentObject()
// if the ticket is a subtask
if(currentIssue.issueTypeId.equalsIgnoreCase("10101")){
// il the parent is a type learning
if(parent.issueTypeId.equalsIgnoreCase("10502")){
// set checkbox to YES
currentIssue.setCustomFieldValue(customField, "SI")
}
}
the name of the Checkbox filed is "Richiesta formazione" and has one single possible value: "SI"
the error I get is: Cannot find matching method

Could you please help me?
Thank you in advance
/Pas