microsoft / wiql-editor

Search work items with wiql queries.
https://marketplace.visualstudio.com/items?itemName=ms-devlabs.wiql-editor
MIT License
4 stars 1 forks source link

WIQL Playground executes query not supported by ADO Queries front end #37

Closed bart029 closed 6 days ago

bart029 commented 5 months ago

Describe the bug I created a query in the WIQL playground that returns results when run in the playground. When I click on the Open in queries button, an error is returned in ADO and no results are returned. WIQL playground should not support a query that results in an error in ADO.

Environment:

Screenshots Query executed in WIQL playground: image

Error shown when clicking on Open in queries button: image

To Reproduce Steps to reproduce the behavior:

  1. Enter the following query in the WIQL playground: SELECT [System.Id], [System.WorkItemType], [System.State], [System.Title] FROM workitems WHERE [System.TeamProject] = @project AND [System.AreaPath] UNDER 'CSG-Wk-Mgmt\COO\EDE\Tech Practices\K2' AND NOT ( [System.WorkItemType] = 'Bug' AND [System.State] = 'New' )
  2. Click the Run Button. THe query will return results
  3. Click the Open in queries button. An error will be returned stating: Operation failed: Unexpected node: [System.WorkItemType] = 'Bug' and [System.State] = 'New'

Expected behavior Either the WIQL playground should catch the error and give an informative message to the user within the playground OR the query should execute in ADO Queries in the same way it executes in the Wiql playground.

Additional context I have isolated the issue causing this behavior to the "AND NOT" clause seen in line 10 combined with the "=" operator in line 11 and 12 of my attached query. If it is replaced with "AND" and "<>" the error disappears.

AminTi commented 5 months ago

Hi, I will test it and get back to you as soon as possible

bart029 commented 4 months ago

Any updates??

bart029 commented 3 months ago

Still looking for an update to this issue.

AminTi commented 3 months ago

We are currently working on many extensions, and we've added your issue to our backlog. We appreciate your patience and understanding as we strive to address it as soon as possible.

AminTi commented 6 days ago

HI guys here is a solution you will get the same result SELECT [System.Id], [System.WorkItemType], [System.Title], [System.State], [System.AreaPath], [System.IterationPath] FROM workitems WHERE [System.TeamProject] = @project AND [System.AreaPath] UNDER 'Global Goals\Energy' AND ([System.WorkItemType] <> 'Bug' OR [System.State] <> 'New')