Git Product home page Git Product logo

wiql-editor's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wiql-editor's Issues

Don't see the WIQL Editor tab

So this will almost certainly make me look stupid, but, that's fine.

I'm in Azure Devops, but when I go to the boards and then create a query, I don't see the WIQL Editor tab anywhere. I'm sure I'm missing something obvious, but my question is, what am I missing? The ADO native editor sucks, and I really need the ability to write WIQL queries.

Thanks!

two different type of responses in showing using Wiql playground and normal query form postman

Hi

I am facing issue of two different responses using different tools
with Wiql playgorund i am able to get the result as table but when

Query : SELECT
        [System.Id],
        [System.WorkItemType],
        [System.Title] FROM workitems 
WHERE [System.AreaPath] = 'Test Agile Project\Winter Sprint 1' 
and  [System.state]='New'

Wiql playgorund Results:
793 User Story Winter Sprint 1 user story 7
792 User Story Winter Sprint 1 user story 6
Found 2 results

with postman using POST url the response is like as below for the same query

postman Results

{
    "queryType": "flat",
    "queryResultType": "workItem",
    "asOf": "2017-10-26T18:40:00.95Z",
    "columns": [
        {
            "referenceName": "System.Id",
            "name": "ID",
            "url": "https://tfs.XYZ.edu/tfs/ITS%20AppDev/_apis/wit/fields"
        },
        {
            "referenceName": "System.WorkItemType",
            "name": "Work Item Type",
            "url": "https://tfs.XYZ.edu/tfs/ITS%20AppDev/_apis/wit/fields"
        },
        {
            "referenceName": "System.Title",
            "name": "Title",
            "url": "https://tfs.XYZ.edu/tfs/ITS%20AppDev/_apis/wit/fields"
        }
    ],
    "workItems": [
        {
            "id": 792,
            "url": "https://tfs.XYZ.edu/tfs/ITS%20AppDev/_apis/wit/workItems/792"
        },
        {
            "id": 793,
            "url": "https://tfs.XYZ.edu/tfs/ITS%20AppDev/_apis/wit/workItems/793"
        }
    ]
}

So I am expecting the column values to display in postman response. Is there any way i can get display the column values instead of just the URLs of workitems

Thanks
Pavan

Repo maintenance

Hi there
I'd like to find out if this repo is being actively maintained?
Would love to use it but I cannot get permission from my company to do so due to the lack of recent commits.

Please Advise?
@ostreifel @mmanela @cschleiden

Cannot edit WIQL for a new query

Tried to migrate a query from one instance to another via WIQL and it fails:

  1. Create new query on new VSTS instance
  2. Edit query WIQL on old instance
  3. Copy/paste to new instance
  4. Click "OK" to save new WIQL and observe failure

Workaround: save the empty query first, then edit it on the new instance

WIQL supports EVER operator but unable to save to VSTS as a custom query

Describe the bug
I've been using the EVER operator against [system.iteration.path] to allow us to track work items that have spilled over to another sprint.

I'm able to get the results in WIQL which has been great even though there is a red warning icon displayed at the start of the line.

When I select "Open in queries", the results are displayed in VSTS but I'm unable to save the query. I get a message "The operator for row 3 is not recognized".

In editor view I can see that the WAS EVER operator has a red exclamation mark. I'd really appreciate any advice you have as we use dynamic queries quite often.

Here's a snippet of my query with the project/team replaced with generic terms:

SELECT
[System.Id],
[System.WorkItemType],
[System.Title],
[System.State],
[Microsoft.VSTS.Scheduling.StoryPoints],
[System.AreaPath],
[System.IterationPath]
FROM workitems
WHERE
[System.TeamProject] = @project
AND [System.WorkItemType] = 'User story'
AND [System.AreaPath] IN ('project\team')
AND [System.IterationPath] EVER @CurrentIteration('[project]\team') -1
AND [System.IterationPath] = @currentiteration('[project]\team')
ORDER BY [System.Id] ASC
ASOF '12/03/19 17:00'

Environment:

  • Chrome
  • Azure Dev Ops

Screenshots

To Reproduce
Steps to reproduce the behavior:
See above

Expected behavior
Custom query can be saved in VSTS

Additional context
N/A

Option "Match linked work items first" is missing

Describe the bug

  • custom query in Azure DevOps
  • Tree of work items
  • Filter Options "Match linked work items first" or "Match top-level work items first" (default)
  • Edit query in wiql - filter options choice makes no difference

To Reproduce

  1. use default option "Match top-level work items first"
  2. open in wiql editor
  3. use option "Match linked work items first"
  4. open in wiql editor - compare with 2.
  5. execute the wiql query from 4. - the results are identical with the result from 2.

Expected behavior

  • the option "Match linked work items first" is somehow reflected in the wiql query
  • the results of the wiql query are identical with the custom query (respecting the "Match linked work items first" option)

Enable TimePrecision

using REST API this query works
/POST https:////***/_apis/wit/wiql?timePrecision=true&api-version=5.0
{
"query": "SELECT [System.ID],
[System.Title], [System.State],[System.CreatedDate] FROM WorkItems WHERE [System.TeamProject]='MyProject' AND [System.CreatedDate] = '2019-06-20T08:51:14.863Z'"
}
in WIQL the same query fail because timePrecision is not enable by default
At the moment you can compare 2 Date but not 2 DateTime

Save button doesn't work on replatformed query page

Describe the bug
When the new preview is turned on (turn on preview "New Boards Hubs"), there is an issue saving the query. Somehow the callback argument is lost

Environment:

  • Browser [e.g. chrome, edge]: Crhome
  • onpremises (Azure Devops Server/tfs) or hosted (Azure Devops): Both

Screenshots
image

To Reproduce
Steps to reproduce the behavior:

  1. Go to a queries page that has the extension installed
  2. Turn on New Boards Hub preview in the preview panel
  3. Click on the header ... to select "Edit WIQL" extension
  4. Click "Save Query" in the wiql editor
  5. See error

Expected behavior
The query should save properly

Additional context
n/a

Wiql-editor playground no longer working in Edge

Using version 2.0.76 in TFS 2018 Update 3 the playground functionality no longer works in Edge.
It will hang on load. It works uysing Chrome.

In the JavaScript console we get:

at ./scripts/getCurrentTheme.ts (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:357:1)
   at __webpack_require__ (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:20:12)
   at eval code (eval code:10:22)
   at ./scripts/wiqlEditor/wiqlEditor.tsx (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:729:1)
   at __webpack_require__ (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:20:12)
   at eval code (eval code:6:22)
   at ./scripts/wiqlPlayground/playground.ts (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:741:1)
   at __webpack_require__ (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:20:12)
   at Anonymous function (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:84:11)
   at Anonymous function (http://tfs.company.com:8080/tfs/_apis/public/gallery/publisher/ottostreifel/extension/wiql-editor/2.0.76/assetbyname/dist/playground.js:1:584)```

Unable to Save Query

Whenever I open up the query editor and paste in a new query, then save, the query is not saved. I've tried this repeatedly, with different queries and after refreshing the browser. I'm using Safari on a Mac. This worked fine a few weeks ago.

Query Across Projects Stopped Working

Describe the bug
Query Across Projects Stopped Working

Environment:

  • Chrome
  • hosted (Azure Devops)

Screenshots
image

To Reproduce
Data should be returned from other projects. This stopped working last week but then it started working again even though I made no changes to the query.

Expected behavior
I expect results from multiple projects.

Additional context
Add any other context about the problem here.

Query can not be saved

Hi,

save button is always disabled. If I try to save query using CTRL+S error message "ok callback not set" is displayed

Console log:
image

Thank you for providing such amazing addon! Hopefully you will be able to fix this issue fast.

License?

Hi Otto,
could you please add the license under which the WIQL-Editor is published?
Thank you
Carina

Is possible to use Group by ?

I try to use group by equal in SQL Language, like that:

SELECT
        COUNT(1) AS TOTAL,
        [System.Tags]
FROM workitems
WHERE [System.TeamProject] = @project
GROUP BY [System.Tags]
ORDER BY [System.ChangedDate] DESC

Is it possible to search Tags by wildcard?

I can search by Tag, provided I specific the exact Tag. And that's how queries work even without WIQL.

I was hoping it would be possible to perform Tag wildcard search using WIQL. E.g. all Tags containing %wave%. Tried various combinations without success. Any suggestions?

Clicking the browser back button does not navigate back if I click Edit Wiql from a query's results view if you're using Chrome

(My team and I are really thankful for your work, please take this issue as a bug report for functionality we deeply enjoy using).

Steps to reproduce:
1.) From the Work Queries section in TFS, select a query on the left
2.) Click the Edit Wiql button in the results section
3,) That brings you to the Wiql Editor...
4.) Use your mouse's back button to navigate backwards

Expected result:
You go back to the query list and results page (perhaps with a warning asking if you want to save your changes)

Actual result:
The screen doesn't change.

Clicking links (almost) always results in unauthorized response

This issue is occurring on TFS 2015 Update 4 (on premises).

In the playground, I run a query, and I get a list of responses. When I click any of the links, I get the following error:

Ajax request failed with status: Unauthorized.
TFS.Core.Ajax.AjaxException: Ajax request failed with status: Unauthorized.

Refreshing and hard-refreshing do nothing. However, if I middle click the link, it works as expected.

The same thing happened just now when clicking the "Report an issue" link at the top of the page; I got a bunch of Refused to load the stylesheet '...' because it violates the following Content Security Policy directive: "style-src 'unsafe-inline' assets-cdn.github.com". errors. Middle clicking fixes this issue as well.

Putting the github issue aside (as I haven't investigated that at all):

I looked into the cookies on the pages that are giving the errors: EditThisCookie shows all the cookies one would expect, however, looking into the Network tab in Chrome Dev Tools shows that all the Ajax requests are being sent without any cookies.

Looking into the iframe the results are being served from, window.document.location is empty. I have a feeling this is the root of the issue; chrome is making ajax requests based on the cookies applicable to window.document.domain, and finding none,

I ran the $("a.row").attr("target", "_parent"); in the console and re-tried clicking any of the work item links and they all worked as expected, however they no longer opened in new tabs.

Please let me know if I can provide any more information that would assist you. I may have time to look into the error myself in about three weeks if you don't have time before then. Thanks.

Running WorkItemLinks queries returns results, does not populate table

Description

TFS Version: TFS 2015 Update 3
Extension Version: 1.6.22

Running the following query:

SELECT [System.Id], [System.State], [System.WorkItemType] 
FROM WorkItemLinks 
WHERE
        [Source].[System.Id] = 107932
        AND [System.Links.LinkType] = 'System.LinkTypes.Hierarchy-Forward'
        AND [Target].[System.WorkItemType] <> ''
ORDER BY [System.Id]

The only thing displayed in the results is: "Found {#} results" (but with an actual number). Screenshot attached.

Debugging

I've also done my best to try and debug this a bit, though I don't know how helpful it will be, but here goes (keeping in mind I know almost nothing about React.js):

As best I can tell, React is having a problem rendering the rows that are created in WorkItemRow.render(), since the results table is empty:

<div id="query-results">
  <div data-reactid=".1">
    <table data-reactid=".1.0">
      <tbody data-reactid=".1.0.0"></tbody>
    </table>
    <div data-reactid=".1.1">Found 11 results</div>
  </div>
</div>

I set breakpoints in the render function to try and capture the results of return (React.createElement("a".... I put the first 5 or 6 row objects into an array, and used CircularJSON to stringify them. The resultant JSON is also attached. Maybe you can find something there that's out of the ordinary compared to a non-WorkItemLinks result.

Attachments

capture
results.json

Permissions

How do I grant permissions to Contributors to use Wiql Playground? (TFS 17 OnPrem)
They can see it, but it won't let them use it.

Extension is not working correctly on DevOps 2020 On-Prem Environment

I'm trying to use the extension of DevOps 2020 On-Prem Environment but every time I try to run the extension I receive the error below:

An undefined error occurred while attempting to connect to the server. Status code 0: .

Server Version is Version Dev18.M170.6
Client is Edge - Version 87.0.664.66 (Official build) (64-bit)

wiql error saving query Expected end of string. The error is caused by <<(>>

When I try to save my wiql given below, I get error: wiql error saving query Expected end of string. The error is caused by
image

If I remove the code snippet “(‘[MyProject]\MyTeam’)” I can save. What is wrong in the syntax for the @currentIteration ?

SELECT
[System.Id],
[System.WorkItemType],
[System.Title],
[System.AssignedTo],
[System.State],
[System.Tags]
FROM workitems
WHERE
[System.TeamProject] = ‘MyProject’
AND (
[System.WorkItemType] = ‘User Story’
OR [System.WorkItemType] = ‘Defect’
)
AND [System.State] <> ‘’
AND [Invensys.Team] = ‘MyTeam’
AND [System.IterationPath] UNDER @currentIteration(‘[MyProject]\MyTeam’)
ORDER BY [System.Id]

Adding an additional field to WIQL removes resulting columns

Execute this query in Wiql Playground

SELECT
[System.Id],
[System.WorkItemType],
[System.Title],
[System.State],
[System.AreaPath],
[System.AreaLevel1],
[System.AreaLevel2],
[System.RelatedLinkCount],
[System.IterationPath]
FROM workitems
WHERE
[System.TeamProject] = @project
AND [System.WorkItemType] = 'Epic'
AND [System.RelatedLinkCount] > 1
ORDER BY [System.ChangedDate] DESC

And you get all the columns. Add [System.History] to the projection and the ID, AreaLevel1, AreaLevel2, and RelatedLinkCount fields magically disappear!

Saved changes does not get applied in "Results" nor "Editor" view.

  1. open existing query which is saved in "My queries" in "Editor" view
  2. open "..." > "Edit query wiql"
  3. edit query displayed as text (no error shown)
  4. "Save query" button appears active > click it > two issues in console:
    image
  5. close wiql editor with "x"
  6. no change in my query present (even if I force reload), also the modification will not be present if I open the wiql editor again

thanks, Jan

WIQL query only returns first 50 rows of results

Describe the bug
Have created a query using WIQL Playground but the results appear to be limited to the first 50 rows.
Message at foot of report "Showing first 50 results" without any obvious sign/link to show additional results.
When we click "Open in queries" CTA then the vsts UI displays 100 results.
We need to use WIQL because the asof functionality isn't available in vsts.

Environment:

  • Chrome
  • Hosted

Screenshots
No errors in the dev console - returns 200 response

Expected behavior
I expect to see all work items that match the query to be displayed when I press "Run"

Additional context
N/A

WIQL ASOF does ignore System.Tags filter

Issue:
microsoft.zip

My Query:
SELECT
[System.Id],
[System.WorkItemType],
[System.Title],
[System.AssignedTo],
[System.State],
[System.Tags]
FROM workitems
WHERE
[System.TeamProject] = @project
AND NOT [System.Tags] CONTAINS 'MyTag'
ASOF '2020/7/23'

Result in list of work items including work items with Tags 'MyTag'
See attached screenshots

I am able to reproduce this on 18.170.30525.1 (Azure DevOps Server 2020)
For adding the ASOF part of the query the following extension is used : https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor

Hopefully you can help in resolving this issue.
Thanks in advance.

Answer microsoft:
I have checked and concluding you that the ASOF parameter doesn’t work as expected in Azure DevOps 2019 and 2020 respectively.
Also, upon checking with internal team, they mentioned that we don’t own the Wiql Editor extension- https://marketplace.visualstudio.com/items?itemName=ottostreifel.wiql-editor#qna

We would like you to reach out to respective extension provider by creating an issue on Issues · ostreifel/wiql-editor · GitHub
You would get the right team engagement who can help you addressing this.

As we are from Azure DevOps team, we couldn’t provide much help here. I am sorry about that

Should you have any questions feel free to write to me.

Query return

Hello,

When I created a query and return respective results, "date colums" aka "Closed Date", "Created Date", respectiva value is formatted to UTC, not local time.

Intelisense no longer working in Wiql

Only recently (within 2 weeks) the Intellisense is not working in the Wiql Playground.

There are a few columns I don't remember the full name so I cannot add it in the query. I have tried in edge, chrome and an inprivate window.

Save not working

It seems when editing a query clicking the Save button doesn't do anything i.e. not saved, no error. Exporting works with the modified query however.

Filter by date and time (hour)

There should be possibility to filter by "changed date and time" in Wiql. Even better if you can this feature in default query section. Basically i want to query work items which changed during last 'x' hours.

in wiql -

System.ChangedDate ='12/07/2018, 6:42:45' or System.ChangedDate =('12/07/2018, 6:42:45')-1hour

Ability to edit wiql of unsaved query and also ability to generate wiql query string

I would like to have the ability to build ad-hoc single use queries, that don't need to be saved. Simply generate the query string based on the DevOps WIQL query string syntax:

https://{ServerName}/{CollectionName}/{ProjectName}/_workitems?_a=query&wiql={Encoded WorkItemQueryLanguage}

If this could be done without having the save the query first, that would be great. Otherwise exporting to query string would still be helpful to use the query as a scratchpad to generate the query string.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.