Hello,
In Jira Cloud instance Incidents project's incident entity having pre-defined custom field called 'Severity'. Looks like Jira Rest API is providing wrong datatype for Severity field in Incidents Project,
While checking metadata, it says that field type is array but on creation of issue it expect single value.
Metadata URL: https://opshub.atlassian.net/rest/api/2/issue/createmeta?projectKeys=INC&expand=projects.issuetypes.fields
- customfield_10414: {
- required: true,
- schema: {
- type: "array",
- items: "im-severity",
- custom: "com.atlassian.jira.jira-incident-management-plugin:incident-severity",
- customId: 10414
}, - name: "Severity",
- key: "customfield_10414",
- hasDefaultValue: false,
- operations: [],
- allowedValues: []
},
Based on datatype array, if we provide value like below on creation it fail,
Request body:
{"fields":{"summary":"2018_11_19_00_26_09_645_-{AB}","issuetype":{"id":"10001"},"project":{"key":"INC"},"customfield_10022":[{"value":"1 - Critical"}]}}
Response:
{"errorMessages":[],"errors":{"customfield_10022":"Please specify the \"id\" or \"value\" of the severity."}}
As resolution of this bug, we are expecting to provide datatype string in metadata API or allow creation updation with array or object value for severity field.