microsoft / microsoft/wiql-editor

ASOF WIQL queries return incorrect data

Open
#62 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
8
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
When using the https://github.com/microsoft/wiql-editor/ and the WIQL ASOF syntax, result sets are incorrect. Result sets include records that should be filtered out.

Environment:

Screenshots
If applicable, add

  • screenshots to help explain your problem.
  • error in the devconsole (f12)
Image Image Image Image Image

To Reproduce

Imagine a User Story Id = 552817 that was created on Feb 10.

SELECT
    [System.Id],
FROM workitems
WHERE
    [System.TeamProject] = 'Content'
    AND [System.ChangedDate] > @today - 90
    AND [System.WorkItemType] = 'User Story'
    AND [System.IterationPath] = 'Content\FY26\Q3\02 Feb'
    AND [System.State] = 'Committed'
ASOF '2026-02-04'

552817 is included in this result set, incorrectly.

Change the query to include AND [System.Id] = 552817

SELECT
    [System.Id],
FROM workitems
WHERE
    [System.TeamProject] = 'Content'
    AND [System.ChangedDate] > @today - 90
    AND [System.WorkItemType] = 'User Story'
    AND [System.IterationPath] = 'Content\FY26\Q3\02 Feb'
    AND [System.State] = 'Committed'
    AND [System.Id] = 552817
ASOF '2026-02-04'

No results are returned.

This doesn't make any sense.

Expected behavior
552817 should be filtered out by the ASOF query 6 days prior to its creation.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ASOF WIQL reproduction in the issue, comparing the broad query with the version constrained to work item 552817. Investigate how the wiql-editor submits and displays these queries against Azure DevOps; done means the item created after the ASOF date is excluded consistently in both query forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, typescript
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.