Forums

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

Create story with existing fix version using JIRA rest API

Leslie Barrett
Contributor
October 25, 2018

We are trying to create a story issue type using the JIRA rest API.

Below is the sample request REQUEST: curl D -X POST -u ${bamboo.jiraUser}:${bamboo.jiraPassword} -H "Content-Type: application/json" -d '{ "fields": { "project": { "key": "ZEM" }, "summary": "${bamboo.planName} - ${bamboo.buildNumber}", "description": "Fortify Scan Successful. Please review the ticket:\n${bamboo.resultsUrl}", "issuetype": { "name": "Story" }, "customfield_11001": { "value": "No" }, "customfield_10814": {"value": "Risk / Security"}, "fixVersions": [\{ "name": "ZEM FE $\{bamboo.ios.version}"}], "assignee":{"name":"weberj"} }}' https://jira.ews.int/rest/api/2/issue/

But when we send the request with "fixVersion" data, JIRA is unable to create the issue and it is failing with below error.

RESPONSE: {"errorMessages":[],"errors":{"fixVersions":"Field 'fixVersions' cannot be set. It is not on the appropriate screen, or unknown."}}

We tried following the information noted in this link, but continue to be unsuccessful: https://community.atlassian.com/t5/Answers-Developer-Questions/What-is-the-REST-API-call-for-adding-a-fix-version-to-a-Jira/qaq-p/509437

 

1 answer

1 vote
Alexey Matveev
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.
October 25, 2018

Hello,

Kindly make sure that the fixVersions field is defined on the create screen for the Story issue type in the ZEM project.

Suggest an answer

Log in or Sign up to answer