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

The expand parameter can not be used with the fields parameter #601

Open
VincentVrijburg opened this issue Jun 25, 2024 · 1 comment
Open

Comments

@VincentVrijburg
Copy link

Environment

Node version: 18.17.1
Npm version: 9.6.7
OS and version: Windows NT X64 10.0.17763 (on-prem hosted Azure DevOps agent)
azure-devops-node-api version: 13.0.0

Issue Description

When retrieving a set of work items by ids using the WorkItemTrackingApi, I get an error saying The expand parameter can not be used with the fields parameter while I only pass a value for the expand parameter.

cosnt workItemIds = [1,2,3]
const workItems = await witApi.getWorkItems(workItemIds, undefined, undefined, wi.WorkItemExpand.Relations);

Expected behaviour

I believe that when I pass undefined for optional parameters in the getWorkItems method that the optional parameters are not set at all. Only the parameters I pass a value for.

Actual behaviour

It seems that the parameters for asOf and fields are set even though they are optional and set to undefined. If the API cannot handle using the fields and expand parameter at the same time, than this should not be possible to do in the api library.

Steps to reproduce

See the code example under issue description

Logs

##[error]The expand parameter can not be used with the fields parameter.
@vmapetr
Copy link
Contributor

vmapetr commented Jul 26, 2024

Hi @VincentVrijburg thanks for reporting!
We are working on more prioritized issues at the moment, but will get back to this one soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants