diff --git a/lib/jira.js b/lib/jira.js index 190e2661..4590c5b7 100644 --- a/lib/jira.js +++ b/lib/jira.js @@ -2139,4 +2139,41 @@ var JiraApi = exports.JiraApi = function(protocol, host, port, username, passwor }); }; + // ## Get dev status ## + // ### Takes ### + // + // * issueId: issue to to query status + // * applicationType: type of application + // * dataType: type of data to query + // * callback: for when it's done + // + // ### Returns ### + // * error string + // * success object + // + this.getDevStatusDetail = function(issueId, applicationType, dataType, callback) { + var options = { + rejectUnauthorized: this.strictSSL, + uri: this.makeUri('/issue/detail?issueId=' + issueId + '&applicationType=' + applicationType + '&dataType=' + dataType, 'rest/dev-status/', '1.0'), + method: 'GET', + json: true + }; + + this.doRequest(options, function(error, response, body) { + + if (error) { + callback(error, null); + return; + } + + if (response.statusCode === 200) { + callback(null, body); + return; + } + + callback(response.statusCode + ': Error while getting dev status'); + + }); + }; + }).call(JiraApi.prototype);