microsoft / microsoft/wiql-editor

Error when querying with dates

Open
#45 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
When creating a work item query and using a date filter I get the error
"Operation failed: The string must have at least one character. Parameter name: wiql"

Environment:

  • Browser firefox
  • hosted (Azure Devops)
  • If using a local installation what version

Screenshots
Here is a screenshot of the error.

devops-Changed last 45 days-error

To Reproduce
Steps to reproduce the behavior:

  1. Configure DevOps to use European date formats (2024-12-01)
  2. Create a query against the work items and use a date value
  3. See error

The wiql below was used
SELECT [System.Id], [System.WorkItemType], [System.ChangedDate], [System.Title], [System.Tags], [System.State] FROM workitems WHERE [System.ChangedDate] > '2024-07-07T00:00:00.0000000' AND [System.WorkItemType] = 'User Story' AND [System.State] = 'Closed' ORDER BY [System.ChangedDate]
I tried different formats like 5/7/2024 and 2024-07-05 and none of them works.

Even if I use the date selector through the UI I still get the same error. The editor must save the date value in some format the query engine can't understand. The wiql query looks fine including the date value (using ISO format).

Expected behavior
The query should work.

Additional context
Add any other context about the problem here.

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

No files or tests are named. Reproduce the problem in the WIQL editor with a date filter and inspect the generated query and request; done when date-filtered work item queries execute successfully with the documented date formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.