Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

listTransitions response fix; addComment error handling #41

Closed
wants to merge 2 commits into from

2 participants

@streetlight

Hope this helps!

listTransitions -- was returning undefined to me (using 2.0.alpha1), but when I removed the parameter I got the correct result.

addComment -- had no error handling if the statusCode wasn't a 201 or 400.

@streetlight

This tested against JIRA v4.4.1#660-r161644

@lucasvo
Collaborator

I have merged in these changes manually.

@lucasvo lucasvo closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/jira.js
View
4 lib/jira.js
@@ -1161,7 +1161,7 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
}
if (response.statusCode === 200) {
- callback(null, body.transitions);
+ callback(null, body);
return;
}
if (response.statusCode === 404) {
@@ -1301,6 +1301,8 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor
callback("Invalid Fields: " + JSON.stringify(body));
return;
};
+
+ callback(response.statusCode + ': Error while updating');
});
};
// ## Add a worklog to a project ##
Something went wrong with that request. Please try again.