steves / node-jira

A nodejs wrapper for the JIRA REST API
378 stars 169 forks source link

Can not searchJira #131

Open qeesung opened 8 years ago

qeesung commented 8 years ago

When I called node-jira API, I found that searchJira was not working properly. Then I checked the source code . and I change the code like this :

var options = {
    rejectUnauthorized: this.strictSSL,
    uri: this.makeUri('/search'),

-     method:'POST',
+     method: 'GET',
    json: true,
    followAllRedirects: true,
    body: {
        jql: searchString,
        startAt: optional.startAt || 0,
        maxResults: optional.maxResults || 50,
        fields: optional.fields || ["summary", "status", "assignee", "description"]
    }
};

then It works. Is my JIRA version wrong? Or here is the GET method should be used

mtscout6 commented 8 years ago

This repo isn't as actively maintained anymore. Which is why my colleague and I forked it and pushed our own jira-client. I can vouch that our use of a POST action is working, we use this function within a tool we use internally: https://github.com/jira-node/node-jira-client/blob/master/src/jira.js#L409-L430.

Which Version of Jira are you using?