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

Results not loading in Wiql Playground when selecting certain columns in query #35

Open bart029 opened 6 months ago

bart029 commented 6 months ago

Describe the bug We are getting a "Loading Workitems..." message with no results returned when we attempt to execute a query where we select the following columns:

Environment:

Screenshots image

To Reproduce Steps to reproduce the behavior:

  1. Go to Wiql playground
  2. Enter the following query:
  3. SELECT [System.Id], [System.AssignedTo], [System.State], [System.Title], [System.Tags], [System.WorkItemType]

FROM workitems WHERE [System.TeamProject] = @project AND [System.AreaPath] UNDER 'CSG-Wk-Mgmt\RMDM\Singleview' AND [System.WorkItemType] = 'Bug' AND [System.ChangedDate] > @today - 2 ORDER BY [System.ChangedDate] DESC

  1. Click Run.
  2. The "Loading workitems..." message appears and stays there. No results are returned.
  3. Remove the [System.AssignedTo] line from the SELECT statement and click Run.
  4. Results are now returned as expected

Expected behavior Query should return results with any valid fields in the SELECT statement.

Additional context Clicking on the "Open in queries" button to execute the query in ADO results in a successful query.

AminTi commented 6 months ago

Screenshot 2024-05-08 at 13 50 39 Hi, I just tested it and it works as expected. Please make sure you have the correct syntax: (AND [System.AreaPath] UNDER ['CSG-Wk-Mgmt\RMDM\Singleview').

bart029 commented 6 months ago

I'm still having the issue and the syntax appears to be correct. As you can see in the screenshot, when I remove line 3 ([System.AssignedTo],) from my query, it runs properly: image

Adding that line back in causes the query to not run and leaves me with the "Loading workitems..." message: image

AminTi commented 6 months ago

I think you have an error in this line Screenshot 2024-05-16 at 13 23 56 it works for me check that you have the correct areaPAth

bart029 commented 6 months ago

The area path is correct because the query runs properly when line 3 is deleted. We have other queries that fail whenever we attempt to put [System.AssignedTo] in our SELECT statement.

bart029 commented 6 months ago

Different area path, same results. First picture is with [System.AssignedTo] included in the Select statement:

image

Second picture is the exact same query with [System.AssignedTo] removed: image

AminTi commented 6 months ago

 Thanks for reporting, we'll dig into this again

AminTi commented 6 months ago

I need the network logs and the console output to help you. When I try the query, it works as expected for me. Please provide these details so I can assist you better.

bart029 commented 5 months ago

Here is the console output when I click the RUN button:

reactProdInvariant.js:29 Uncaught (in promise) Invariant Violation: Minified React error #31; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7BdisplayName%2C%20url%2C%20_links%2C%20id%2C%20uniqueName%2C%20imageUrl%2C%20descriptor%7D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at reactProdInvariant (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:401053) at traverseAllChildrenImpl (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:403430) at traverseAllChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:403591) at Object.instantiateChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:317802) at ReactDOMComponent._reconcilerInstantiateChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:363042) at ReactDOMComponent.mountChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:363245) at ReactDOMComponent._createInitialChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:334878) at ReactDOMComponent.mountComponent (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:333014) at Object.mountComponent (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:367338) at ReactDOMComponent.mountChildren (https://ms-devlabs.gallerycdn.vsassets.io/extensions/ms-devlabs/wiql-editor/2.1.69/1712739365320/dist/playground.js:2:363381)

bart029 commented 5 months ago

Here is an example of the response for one of the items returned. It looks like the System.AssignedTo field is returning a dictionary instead of a single item. We are also noticing the same behavior when trying return System.CreatedBy and System.ChangedBy. They have the same response format as System.AssignedTo.

"id": 137559, "rev": 21, "fields": { "System.Id": 137559, "System.WorkItemType": "Bug", "System.State": "In Demo", "System.AssignedTo": { "displayName": "Michael Hennessy", "url": "https://spsprodcus2.vssps.visualstudio.com/A0107782f-ba07-497e-9fd7-373fc3be260a/_apis/Identities/3dd3dae4-5abf-6637-82b3-f432a7ce5470", "_links": { "avatar": { "href": "https://dev.azure.com/CSGDevOpsAutomation/_apis/GraphProfile/MemberAvatars/aad.M2RkM2RhZTQtNWFiZi03NjM3LTgyYjMtZjQzMmE3Y2U1NDcw" } }, "id": "3dd3dae4-5abf-6637-82b3-f432a7ce5470", "uniqueName": "Michael.Hennessy@csgi.com", "imageUrl": "https://dev.azure.com/CSGDevOpsAutomation/_apis/GraphProfile/MemberAvatars/aad.M2RkM2RhZTQtNWFiZi03NjM3LTgyYjMtZjQzMmE3Y2U1NDcw", "descriptor": "aad.M2RkM2RhZTQtNWFiZi03NjM3LTgyYjMtZjQzMmE3Y2U1NDcw" }, "System.Title": "Doc: Has a PAT best practices which is great but does not mention what permissions relmgr requires", "System.Tags": "Hardening_REL; TIMEBOX" }, "url": "https://dev.azure.com/CSGDevOpsAutomation/_apis/wit/workItems/137559" },

bart029 commented 4 months ago

Any updates??

bart029 commented 4 months ago

Still looking for an update on this issue.

filiptaik commented 1 month ago

@AminTi I have the exact same issue. Can we please get an update

pablosouza10 commented 1 month ago

Same issue, only "Loading workitem relations..."

ugwulo commented 2 weeks ago

Same issue here

Image

bart029 commented 3 days ago

@AminTi - can we please have an update on this issue? This is still impacting us and based upon the comments on the ticket it appears that several others are impacted as well.