Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rest API Bug - Severity field type inconsistent for Incidents Project Incident entity

priyank patel November 20, 2018

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

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.

 

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Champion
February 16, 2022

Hi @priyank patel ,

you need to specify just the id and not the value. So your request should be :

{"fields":{"summary":"2018_11_19_00_26_09_645_-{AB}","issuetype":{"id":"10001"},"project":{"key":"INC"},"customfield_10022":[{"value":"1"}]}}

Hope this helps,

Fabio

Anshuman Mohapatra
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 18, 2023

Hi @Fabio Racobaldo _Herzum_ 
can you let me know how will we add the following fields to the object : 

1.severity

2.bug type

3.bug environment

4.found by

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events