Search code examples
azure-devopswiql

VSTS: How to query for work items that were not changed in the last 'x' days


I need to find all work items that were never touched or at least were not changed in the last 'x' days.

Using "Changed Date" < "Today -x" doesn't work because it will not find the work items that were created inside those 'x' days.

Ideally I would like to have a query like this

And "Changed Date" < "Today -x"
Or "Changed Date" = "Created Date"

but that doesn't work. It doesn't complain that the query is not correct but it doesn't work. I am trying that from VSTS Query Editor.

Any idea?


Solution

  • I found the solution, the query is

    And "Created Date" < @Today
    And "Changed Date" = [Field] "Created Date"
    

    The important thing here is the "= [Field]" operator that allows you to compare two fields.