var jira = new JiraApi
('http', 'localhost', '8080', 'username', 'password', 'apiversion');
var linkData = {
"fields": {
"project":
{ "key": "TES" },
"summary": "First Issue1",
"description": "creating first issue1",
"issuetype":{ "name": "Bug" },
"priority": { "name": "Medium" }, },
"attachment":{ "name":"Test.docx", "path":"D://image//Test.docx", },
var options = {
rejectUnauthorized: jira.strictSSL,
uri: jira.makeUri('/issue'),
method: 'POST',
json: true,
body: linkData,
};
jira.doRequest(options, function (error, response)
{ console.log(response);
// res.json({ IsSuccess: true, Message: "Success" }); });
You would have to create an issue, grab the issuekey then attach the attachment using /rest/api/2/issue/issuekey/attachments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.