I am trying ScriptRunner Mail Handler to Create Issue With Attachments.
When the project has just summary, description and attachment. It works and issue is created but the project has custom fields on create screens, I am adding this code but it did not work.
How can I handle it or how can I set the custom fields using mail handler?
CustomFieldManager bcustomFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField bcf_ComplaintField = bcustomFieldManager.getCustomFieldObject(11111)
CustomField bcf_Comp_InfoField = bcustomFieldManager.getCustomFieldObject(11112)
CustomField bcf_ServiceField = bcustomFieldManager.getCustomFieldObject(11113)
def issueObject = issueFactory.getIssue()
After added the custom fields, an error occurred like that; ( It works without custom fields)
Caused by: com.atlassian.jira.workflow.WorkflowException: Error occurred while creating issue. This could be due to a plugin being incompatible with this version of JIRA.
It is solved. If custom field is select list, that error is occurred. This helped me.
Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...