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

Get Filter not Working #320

Open
nrfribeiro opened this issue Apr 25, 2021 · 2 comments
Open

Get Filter not Working #320

nrfribeiro opened this issue Apr 25, 2021 · 2 comments

Comments

@nrfribeiro
Copy link

Hi,
I try to use getfilter and is not working. Looking into the code I notice that makeAgileUri call should be makeUri instead

getFilter(filterId) {
return this.doRequest(this.makeRequestHeader(this.makeAgileUri({
pathname: /filter/${filterId},
})));
}

@MikeSperone
Copy link

MikeSperone commented Aug 20, 2021

Just ran into this myself. It looks like it's making a request with the 1.0 API version, even though I have v. 2 specified in my config.
(edit: nm, just looked through the code, and I guess it's just a different endpoint)

I've noticed no PR's have been merged in a couple of years. Is there a maintainer of this project who would be able to comment on this? Is there someone who would be able to review and merge a PR for this?
(edit2: oops, I see this isn't true. Sorry... I should've look around more before commenting)

@MikeSperone
Copy link

I was able to do this workaround, since the internal functions are available:

const JiraApi = require('jira-client');
const jira = new JiraApi({
   /* config parameters */
});

function getJiraFilter(filterId) {
    return jira.doRequest(jira.makeRequestHeader(jira.makeUri({
        pathname: `/filter/${filterId}`,
    })));
}

Sorry I'm unable to go ahead and do a pull request, but hopefully this will save time for anyone who is stuck!

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

2 participants