node-jira-client icon indicating copy to clipboard operation
node-jira-client copied to clipboard

Filter list from listProjects - Support Query

Open mcollie1 opened this issue 4 years ago • 3 comments

when getting the list of projects that a Jira user has access to (jira.listProjects()), the documentation isn't clear about using the query parameters supported by the api. For example, expand and properties.

I want to include issueTypes in the response, but limit the returned fields to issueTypes, key, and id.

Update

the params aren't supported by this library, for the method, but will support be added?

mcollie1 avatar Dec 03 '20 15:12 mcollie1

We currently have it implemented against /projects which is deprecated. To address this, we should implement against /project/search and support the expand parameter. Ideally we support all parameters.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-search-get

randyho-kk avatar Dec 04 '20 00:12 randyho-kk

what would be the corresponding method within the library? Trying with jira.listProjects() and the above mentioned parameters are ignored, unless I'm constructing it wrong

https://github.com/jira-node/node-jira-client/blob/master/src/jira.js#L1126

mcollie1 avatar Dec 04 '20 15:12 mcollie1

@mcollie1 the library doesnt support what you want to do yet. I've added notes on what would be needed to add in order for the library to support it.

randyho-kk avatar Dec 04 '20 15:12 randyho-kk