Forums

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

Error while creating a Bug using Jira Rest endpoints

Madhura Lodam October 4, 2023

I am using the Jira endpoint https://api.atlassian.com/ex/jira/37afe40c-f512-4bf0-a925-7056a5773e9a/rest/api/2/issue 
 with input request body:

{
    
    "fields": {
        "project": {
            "id""1020",
            "key""AB" 
        },
        "summary""JIRA OAUTH POC TESTING- issuetypes-bug",
        "issuetype": {
            
            "name" : "Bug"
        },
        "assignee": {
            "name""madhura.lodam@abc.com"
        },
       
        "description""testing Jira Rest endpoints"
       
        
    }
I am getting below error:
{"errorMessages":[],"errors":{"customfield_10043":"Severity is required."}}
how can I resolve this, what should be the input request structure to create a bug?
Thanks!

1 answer

0 votes
Danut M _StonikByte_
Atlassian Partner
October 4, 2023

Hi @Madhura Lodam,

As far as I can see, the error is caused by the fact that a required field (Severity, with id "customfield_10043") was not provided in the JSON.

Add this field in the JSON with a valid value, as in this example:

fields": { 
         "customfield_10043": "Major",
        "project": {
            "id""1020",
            "key""AB" 
        },

 

Replace "Major" with a valid field value. 

Hope this helps. 

Danut.

Madhura Lodam October 11, 2023

Thanks for your response @Danut M _StonikByte_ 

I am able to create a bug if I send :

{"customfield_10043":

{"value": "Major"}

}

  • may I know how can I get the list of all expected values for this customfield (for example "Major")?

 

  • I am also facing issue in creating feature and program epic and I am hoping to get help on this as well, below are the details:

Input:

{
    
    "fields": {
        "project": {
            "id""102",
            "key""AK" 
        },
        "summary""JIRA OAUTH POC TESTING- issuetypes-feature",
        "issuetype": {
            
            "name" : "Feature"
        },
        "assignee": {
            "name""user@domain.com"
        },
        
        "description""testing Jira Rest endpoints",
        "duedate""2023-10-28"
       
        
    }
Output:
{
    "errorMessages": [],
    "errors": {
        "issuetype": "The issue type selected is invalid."
    }
}
same way it responds when I use issuetype as "Program Epic"
"issuetype": {
            
            "name" : "Program Epic"
        }
Even if I send id in issuetype , I am getting the same error response. 
Can you please help troubleshooting all the above impediments?

Thanks,
Madhura
Madhura Lodam October 15, 2023

Hi @Danut M _StonikByte_ , 

can you please update on the above issues?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events