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

getWorkItems AsOf Date fails #191

Closed
Ninido opened this issue Jun 26, 2018 · 4 comments · Fixed by #206
Closed

getWorkItems AsOf Date fails #191

Ninido opened this issue Jun 26, 2018 · 4 comments · Fixed by #206
Assignees

Comments

@Ninido
Copy link

Ninido commented Jun 26, 2018

Environment

Node version: 8.9.4
Npm version: 5.6.0
OS and version: Windows 8
vsts-node-api version: 6.5.0
typescript: 2.8.3

Issue Description

I'm testing the vsts-node-api library with React and TypeScript and I came upon issue with getWorkItems method and Date parameter (AsOf parameter).

When i trigger my call i get 404 back. Same call Without Date parameter works as expected.

404 call goes to following URL:
https://[URL]/tfs/DefaultCollection/_apis/wit/workItems?ids=358093%2C358094%2C358134%2C358135%2C358136&&$expand=4

The call fails because AsOf=[date] part which is missing between "&&".

Steps to reproduce

const today: Date = new Date();
const featureIds = [358093, 358094, 358134, 358135, 358136];
// create connection object ...
const workItemTrackingApi: IWorkItemTrackingApi = await connection.getWorkItemTrackingApi();
const features: WorkItem[] = await workItemTrackingApi.getWorkItems(featureIds, undefined, today, WorkItemExpand.All, undefined);

Expected behaviour

https://[URL]/tfs/DefaultCollection/_apis/wit/workItems?ids=358093%2C358094%2C358134%2C358135%2C358136&asof=[DATE]&$expand=4

Actual behaviour

https://[URL]/tfs/DefaultCollection/_apis/wit/workItems?ids=358093%2C358094%2C358134%2C358135%2C358136&&$expand=4

@Ninido Ninido changed the title getWorkItems AsOf Date failes getWorkItems AsOf Date fails Jun 26, 2018
@stephenmichaelf
Copy link
Member

I will take a look! Thanks for letting us know.

@stephenmichaelf stephenmichaelf self-assigned this Jun 26, 2018
@Ninido
Copy link
Author

Ninido commented Aug 6, 2018

Is there any status update for this issue? Thanks.

@stephenmichaelf
Copy link
Member

Not yet, will try to take a look tomorrow.

@damccorm
Copy link

damccorm commented Sep 5, 2018

Pretty sure this is the same issue as here: #98

I submitted a PR that should fix both.

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

Successfully merging a pull request may close this issue.

3 participants