node-jira-client
node-jira-client copied to clipboard
Get Filter not Working
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}
,
})));
}
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)
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!