The code that I trying run is it:
...
def issueInputParameters = issueService.newIssueInputParameters().with {
setProjectId(project.id)
setIssueTypeId(issueType.id)
setReporterId(loggedInUser.name)
setSummary(summary)
setPriorityId(priorityId)
setComponentIds(component as Long)
setDescription(description)
addCustomFieldValue(data_field_id, data as String)
addCustomFieldValue(area_solicitante_field_id, "Department -> IT")
}
def validationResult = issueService.validateCreate(loggedInUser, issueInputParameters)
if (validationResult.isValid()){
def result = issueService.create(loggedInUser, validationResult)
}else{
return validationResult.getErrorCollection()
}
But I give this error:
Errors: {customfield_17401=The option 'Department -> IT' is an invalid parent option}
Error Messages: []
How parse data correctly to fill this error?