Forums

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

define severity in post body

mahesh s.g.
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!
April 16, 2020

I was trying to create a request using JIRA, which needs severity to be present 

Example:

by post body is 

{
"fields":{
"project":{
"key": "TEST"},
"summary": "TEST",
"description": "TEST",
"issuetype": {
"id": "101"
},
"components": [
{
"id": "35006"
}
]
}
}

*******

output comes back as 

{    "errorMessages": [],    "errors": {        "customfield_21681""Severity is required."    }}

******

I tried to add severity at multiple places wthin body it is not working 

3 answers

0 votes
Matthias Gaiser _K15t_
Community Champion
April 16, 2020

My two fellow leaders are asking the right questions.

In order to help you a bit more, according to your error message, the severity in your Jira has the custom field id: customfield_21681

Now you need to know what type of field it is - is it a text or a select field or something else? That's influencing how you need to send it to Jira. This example assumes it's a select field:

{
"fields":{
"project":{
"key": "TEST"
},

"summary": "TEST",
"description": "TEST",
"issuetype": {
"id": "101"
},
"components": [
{"id": "35006"}
],
"customfield_21681": {
"id": "ENTER ID OF THE OPTION"
}
}
}

If you need to know the id, you can get it via the createMeta endpoint. Also for more examples, you could check out the create Issue docs.

Cheers,
Matthias. 

0 votes
Stephen Crandell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2020

What type of field is severity? Also, try adding it as customfield_##### instead of severity. Might be a typo in how it is listed in Jira. 

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 16, 2020

How have you tried to send a severity?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events