Is it possible to query in ADO by work item created in the current iteration? So that the query can update with each new iteration - azure-devops

I would like to display the results of a query that identifies the bugs created in the current iteration. AKA "new bugs". I know this can be done by using the created date but that requires the date to manually updated for each new iteration.
Is it possible to leverage the 'current iteration' in the query? Or some way that does require a manual update.
I have tried using only 'current iteration' but this returns all bugs in the current iteration limited by the state that I specify. The result is not limited by when it was created.
I have tried to add a clause for created date, which works, but is not dynamic. meaning it does not increase as the iteration grows in number of days.

Yes, you can add a and/or clause like below
I have a second drop-down list as we have different Teams, so it wants me to tell it which Team I want to bring back items for, from the #CurrentIteration.

Related

Defining an Azure Board query that tracks work I have performed during current sprint - at any given time within that sprint

I am trying to come up with n Azure Board query to return the work I have performed during current sprint - which I am vaguely defining as:
Work In Current Sprint = [A] + [B]
where
A = work items where I completed development stage (or was decided at some point work is irrelevant) and
B = work items I created in current sprint, not necessarily assign to me nor my team (I spent time investigating an issue, and ended up, for instance, finding a bug, so I want this included in this "report").
The closest I could get is the query blow. Problem is it is still not quite accurate, since with regards to items I created during this sprint - I could not find a way to filter created items in this sprint only - results are showing up work items that CURRENTLY BELONG to current sprint, but not necessarily created in current sprint. The only way I see I can achieve what I want is using CreatedBy - but this only provides a "hardcoded" date range offset, at any given time. If I use an offset of 14 days backwards, running query at the last day of the sprint (considering a 2 week sprint duration) should work, but running the query at any day before that, during the sprint, will return stuff created in previous sprints.
I want this query to help me track "work I have performed during current sprint" (as defined above) at any given day within the sprint.
Any better ideas ?
You could use custom date in 'create date' to limit the work item.
And I notice you use 'work items and direct links', then you need set filters for 'Filters for linked work items' part(as you needed, like iteration path etc.). Otherwise it may return linked work item that belong to other iterations, according to the filled filter, like something belows:
I hope it could help.

How to show changed Work Items using Azure DevOps Queries (Audit-like query)

Trying to resolve how to get a list of all changed Work Items from a Backlog within Azure DevOps using queries, so far not successful.
Reason for this query, is that our organization is still fairly new to ADO and are still changing/tinkering with all WITs.
As of this, a query would fill the gap, to display who and what have changed on every WITs.
Currently tried tinkering with the following attributes [Changed Date, State Changed Date, etc.]
Although unfortunately, this ‘only’ shows some WITs and not WITs where say, Assigned To, Title, Target Date or any other field might have been altered.
I could do a query, but I reckon it would be a massive query which, in the end, might not even function
The History field might do the trick, but that's not an Attribute which one could use in a query?
Would it be possible to get an, say Audit-like query, which displays every change made to WITs during the last +30 days or so?
Br

How to query the historic state of items at a specific date?

I would like to query the state of a work item at a specific date. E.g. I want to know what was the state of all work items of one team last Monday. Of course I can go through all single items and check the state graphs manually, but that's not really feasible with several hundred items.
I tried to use a combination of different fields, including the 'State Change Date' but it only tells me when a change happened but not what was the specific state on the selected date.
Is there any way to query the historical states of a work item?
How to query the historic state of items at a specific date?
You can achieve this in Power Bi. First create an Analytics view in Azure DevOps.
For example:
Then open this analytics view in Power Bi.
Filter by Date field:

Create a query that shows work you planned at the beginning of a sprint

I'm looking to create a query that shows all of the stories that were added to the sprint during our sprint planning meeting. This meeting always takes place on day 1 of the sprint.
Naturally, some stories may be removed mid-sprint but I'd still like to see what was originally planned.
Equally, some stories may be added mid-sprint and I wouldn't want to include those.
I noticed that the built-in Velocity widget has a 'planned' bar, but I'm not entirely sure how that's calculated.
For this issue ,deleted work items cannot be displayed with other work items in queries. If you want to query the stories created by a certain period of time, you can do it in two steps.
First you can query the stories created in the initial time period by the following conditions.
Then you can add the Created Date and Iteration Path column in Recycle Bin to find the stories deleted in this time period.
If your stories are permanently deleted(Remove from Recycle Bin), then you will really cannot query them.

Preserve everything count and get filtered results in t-sql?

I have created a complex sql server 2008/coldfusion search page, that searches thru a variety of tables.
On the left is a list of the categories, plus an everything category, by each category or type of result is a total number of results of that type found in the current search result.
I have everything fine, but I am hoping there is a more optimal approach.
Because everytime i filter the search to a specific category, i still have to get all the results, so as to make sure the everything category has the correct totals.
And because of this, I have realized this is a problem I've had in lots of other programs in coldfusion/sql.
Where you want to reduce the number of results by some field in the select, but you need to keep the original recordcount total.
But you really don't want to re-run the whole massive query everytime, when you just need to get the trimmed results.
This program is 1 cfc, 1 cfm, 1 stored procedure, and jquery/ajax inside the cfm to call the cfc.
The cfm calls the cfc when it originally get's a form submitted search request, and then any filtering does the same thing.
However if there are more than 20 results then it show's a button at the bottom to do via ajax get 20 more records.
My main goal is to improve performance, make sure i keep an accurate record of what the record count is before any filtering is done, without having to rerun the unfiltered query every time.
This is a kind of complex problem, so there might not be any answers...
Thank you all for trying..
I would run the "big" query once, then pop it into a SESSION variable. Then I'd use Query-of-Query to return subsets based on filters.
The main query always exists, so you can query against that or use metadata like bigQuery.recordCount. Your QofQ is a smaller set of data you can use for display. And you can re-apply filters without having to return to the database.
Well you need to run the query (or a count(*)) at least once to get the total number. You could:
Cache this query and refer to the
cached query's recordcount again
and again
Store the record count in the session scope until the next time it is run for this user