Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
634 stars 242 forks source link

WIQL queries which query WorkItemLinks return nothing when using vsts-cli #434

Closed tomaustin700 closed 5 years ago

tomaustin700 commented 5 years ago

Describe the bug When trying to query WorkItemLinks using WIQL no results are returned.

To Reproduce vsts-cli version 0.1.3

I am using the vsts-cli to query an on premise TFS database.

Steps to reproduce the behavior:

  1. login using vsts login
  2. Run command: I am running the query the following way, nothing is returned however when I run a similar query through TFS I get results. $data = vsts work item query -p 'Project' --wiql "select [System.Id] from WorkItemLinks where (Source.[System.TeamProject] = 'Project' and Source.[System.State] in ('Closed', 'Resolved')) and ([System.Links.LinkType] = 'System.LinkTypes.Related-Forward') order by [System.Title], [System.Id] mode (MustContain)" -o json

When running with --debug I can see the work items I would expect in the response.

Expected behavior The query would return the data I expect. I can run other queries this way and they return the data I expect so it seems to be an issue when querying WorkItemLinks

Debug logs Can send debug logs on request (they contain private data which I don't want to make publicly visible)

snankani commented 5 years ago

Thanks @tomaustin700 for using vsts-cli and raising the issue.

We have released Azure DevOps cli as an extension to Azure CLI and vsts-cli is in support mode. All the commands in vsts-cli are ported to new Azure DevOps cli extension. Recommendation is to use the new Azure DevOps cli extension, you can find the details in below links.

https://github.com/Microsoft/azure-devops-cli-extension/blob/master/doc/getting_started.md https://github.com/Microsoft/azure-devops-cli-extension/blob/master/README.md

We are investigating this issue and keep this issue updated with our findings.

ishitam8 commented 5 years ago

Thanks @tomaustin700 , for finding this issue. Currently we are only supporting WorkItems returned by query result and not the WorkItemLinks results.

tomaustin700 commented 5 years ago

@ishitam8 So if I want to run a query finding all of the work items related to another work item how would you suggest I do it?

geverghe commented 5 years ago

@tomaustin700 I think what you are looking for is this #125 (Here is the issue #93 for more context) and specifically az boards work-item relation show --expand-relations. Do have a look and let me know - we can continue our discussion there. I am closing this thread. Feel free to re-open if #125 does not answer your question.

f00-beerd commented 5 years ago

Why are we considering the vsts cli abandoned when the new cli doesn't work for people with DevOps Server 2019?

Crono1981 commented 1 year ago

Thanks @tomaustin700 , for finding this issue. Currently we are only supporting WorkItems returned by query result and not the WorkItemLinks results.

Shouldn't a WIQL query on WorkItemLinks cause the CLI to exit with an error code to indicate exactly that?