I am using the below code for creating a issue in Jira cloud but its not working. I am getting error response as Summary : it is not on the appropriate screen or unknown and same description, assignee, reporter and priority
var bodyData = {
"fields": {
"project": { "key": "TEST" },
"summary": "First Issue",
"description": "Creating First Issue",
"issuetype": { "name": "Bug" },
"assignee": { "name": "Karthikeyan" },
"reporter": { "name": "Karthikeyan" },
"priority": { "name": "Minor" }
} }
var options = {
method: 'POST', url: 'https://domain/rest/api/3/issue',
//auth: { bearer: <access token> },
OAuth1: 'access token',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
}, body: JSON.stringify(bodyData)
};
request(options, function (error, response, body)
{ if (error) throw new Error(error);
console.log('Response: ' + response.statusCode + ' ' + response.statusMessage); console.log(body);
});