Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated createIssue to add support for parent issues and components.

  • Loading branch information...
commit 9e753dc2b65bb58ce81d6a0657c6abd13fd5f356 1 parent 76720df
@dashersw authored
Showing with 12 additions and 3 deletions.
  1. +12 −3 lib/jira-bot.js
View
15 lib/jira-bot.js
@@ -229,8 +229,7 @@ JiraBot.prototype.logout = function () {
JiraBot.prototype.createIssue = function (issue) {
- return this.json('POST', 'api/latest/issue', {
- fields:{
+ var fields = {
project:{
key:issue.project
},
@@ -243,8 +242,18 @@ JiraBot.prototype.createIssue = function (issue) {
summary:issue.summary,
issuetype:{
name:issue.type
- }
+ },
+ components:issue.components
+ };
+
+ if (issue.parent)
+ fields.parent = {
+ id: issue.parent
}
+
+ console.log(fields);
+ return this.json('POST', 'api/latest/issue', {
+ fields: fields
});
};
Please sign in to comment.
Something went wrong with that request. Please try again.