Forums

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

How to create a issue in Jira cloud using Node js. Someone please help me on this

Karthikeyan N October 10, 2018

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);

});

1 answer

0 votes
Nir Haimov
Community Champion
October 10, 2018

 

Hello @Karthikeyan N and welcome to the community!

Your connection with the Node.JS to Jira seems to be fine, otherwise you would receive a different error.

As the error says "Summary : it is not on the appropriate screen or unknown"

You need to check your screen configuration, make sure that all the fields you mentioned exist in the issue create screen of the issue type you are trying to create.

Karthikeyan N October 10, 2018

Thanks for the reply @Nir Haimov

I have checked the screen configuration, the fields which i mentioned it's there in create screen, but still i am unable to create

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events