create issue through API

vashim shekh January 11, 2021

Dear Sir,

 

Create BUG issue through API but error is coming that Fixversion Screen Not set.

Bug screen Fixversion filed available and mandatory.

 

There is way to short the issue.

 

 

 

 

1 answer

1 accepted

0 votes
Answer accepted
Sandesh Shetty
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.
January 11, 2021

@vashim shekh 

Please find the doc. link to create issue throgh api https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-post 

you can set the Fixversion field while creating issue for. eg like this

"fixVersions": [
{
"id": "10001"
}

vashim shekh January 11, 2021

Hi,

 

We are trying to raise defects in Jira using Jira rest apis. Please find below details regarding the api we are using.

 

URL : https://jira.devops.idfcbank.com/rest/api/2/issue

 

Input: 

{"fields":

{

"summary":"Invalid bug raised from api",

"issuetype":{"name":"Bug"},

"project":{"key":"APIF"},

"description":"this bug was raised from jira rest api to test qrace integration",

"customfield_10404":{"value" : "Medium"},

"customfield_10403":{"value" : "Development" },

"fixVersions":[{"name":"TL - Origination Bouquet" }]

 },

"update":{

    "issuelinks":[

        {

          "add":{

              "type":{

                  "name":"Relates"

                },

                "inwardIssue":{

                    "key":"APIF-1138"

                }

            }

        }

    ]}

}

 

We are not able to generate defect using api. We are getting following error :

{

    "errorMessages": [],

    "errors": {

        "fixVersions": "Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown."

    }

}

Sandesh Shetty
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.
January 11, 2021

@vashim shekh 

Please check create issue screen of bug issue type. whether fixVersions filed is available or not on that screen? also check "TL - Origination Bouquet" value is available in project Releases.

Like # people like this
vashim shekh January 11, 2021

we have checked already all components is there.

Sudarshan
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.
January 11, 2021

Hello @vashim shekh 

Are you trying to Create a Bug? or a Defect.?
sometimes a Defect is of issue type sub-task and not parent, your approach is correct.!

Note:
Hope you are aware of the policies of your organization when providing client specific URL: https://jira.devops.idfcbank.com/rest/api/2/issue
(though this cannot be accessed by every Atlassian community member)

If it is a site-specific query, I would suggest directly contact the Atlassian support
(it is a better practice)

vashim shekh January 13, 2021

@Sudarshan @Sandesh Shetty 

 

thanks to you sandesh and sudarshan also , we have fixed now there is permission issue we found.

 

Thanks.

Suggest an answer

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

Atlassian Community Events