Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on getting all boards #225

Closed
jeremieca opened this issue May 25, 2018 · 2 comments
Closed

Error on getting all boards #225

jeremieca opened this issue May 25, 2018 · 2 comments

Comments

@jeremieca
Copy link

jeremieca commented May 25, 2018

Hello,

I have an error on getAllBoards() method.

This is my code :

        jira.getAllBoards()
            .then((jiraOutput) => {
                ......
            })
            .catch(reject);

The error is :

.../node_modules/bluebird/js/release/debuggability.js:868 Unhandled rejection StatusCodeError: 400 - {"errorMessages":["No project could be found with key ''."],"errors":{}}

I found the problem in node-jira-client, it's on getAllBoards method. When there is no projectKeyOrId in argument, param is passed in query string as empty. So Jira try to filter on an empty project name :

return this.doRequest(this.makeRequestHeader(this.makeAgileUri({
        pathname: '/board',
        query: {
          startAt: startAt,
          maxResults: maxResults,
          type: type,
          name: name,
          projectKeyOrId: projectKeyOrId
        }
})));

In the case where I really want to get all board (whithout filtering on project key), I need to remove projectKeyOrId key in query object. And it works.

@LeonAlvarez
Copy link

Pull request to fix this issue #227

@pioug
Copy link
Contributor

pioug commented Mar 15, 2019

Fixed in #247

@pioug pioug closed this as completed Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants