Jay
Jay

Reputation: 381

How to create query in azure to find change in remaining work field

I want to create a query wherein we can track in a specific sprint, within 24 hour span, how many hours are burned by the team members.

My way of developing this query is if I can find change in the remaining work field , I can track it.

I have created query using @StartOfDay variable. But it is giving me data of tasks which are older than 24 hours also.

Is there any way in which I can limit it to last one day or 24 hours?

enter image description here

Upvotes: 0

Views: 213

Answers (2)

wade zhou - MSFT
wade zhou - MSFT

Reputation: 8488

Your clauses in the query is not accurate actually. The Changed Date monitors on any changes on the work item but not only Remaining work field.

In addition, the two Remaining work clauses with >=[Field] or <=[Field] evaluates all, which is not needed.

To find change in the Remaining work field, you can add a custom field ChangedTime for task:

enter image description here

add a work item rule(for inherited process), record the time when Remaining Work field is changed.

enter image description here

In the work item query, filter the ChangedTime which is > @StartOfDay('-1d'):

enter image description here

And add ChangedTime and Remaining Work in column option so it will display in the query result. You can sort the ChangedTime by time, to get the work items in 24 hours.

enter image description here

Or you can export the result in CSV format, and check tasks in excel instead. It supports accurate time filter:

enter image description here

Upvotes: 1

Bright Ran-MSFT
Bright Ran-MSFT

Reputation: 14074

The query macros '@StartOfDay' can only be accurate to the date, not the hour time. The expression '@StartOfDay', '@StartOfDay-1' or '@StartOfDay('-1d')' will contain the whole previous day of current date.

There is no available query macros that can be accurate to the hour time.

If your projects really need this feature, I recommend you try to report a feature request on Developer Community. This will make it more convenient for the Azure DevOps engineer teams to receive and understand your ideas. And your feedback also could be helpful for improving the Azure DevOps products.

Upvotes: 0

Related Questions