You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/boards/queries/query-by-date-or-current-iteration.md
+10-14Lines changed: 10 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.author: chcomley
9
9
author: chcomley
10
10
ms.topic: example-scenario
11
11
monikerRange: '<= azure-devops'
12
-
ms.date: 10/15/2024
12
+
ms.date: 08/07/2025
13
13
#customer intent: As a team member, I want to learn how to query work items in Azure Boards so I can find items based on when they were created, which iteration they belong to, or other factors.
14
14
---
15
15
@@ -240,7 +240,7 @@ If your team follows Scrum processes, you schedule work to be completed in sprin
240
240
The query finds any item assigned to a sprint that corresponds to the current iteration path for the team. For example, if a team is on Sprint 5, the query returns items assigned to Sprint 5. Later, when the team is working in Sprint 6, the same query returns items assigned to Sprint 6.
241
241
242
242
> [!NOTE]
243
-
> For the `@CurrentIteration` macro to work, the team must have selected an iteration path whose date range encompasses the current date. For more information, see [Select team sprints and set the default iteration path](../../organizations/settings/set-iteration-paths-sprints.md#select-team-sprints-and-set-the-default-iteration-path). Also, queries that contain this macro are only valid when run from the web portal.
243
+
> For the `@CurrentIteration` macro to work, the team must select an iteration path whose date range encompasses the current date. For more information, see [Select team sprints and set the default iteration path](../../organizations/settings/set-iteration-paths-sprints.md#select-team-sprints-and-set-the-default-iteration-path). Also, queries that contain this macro are only valid when run from the web portal.
244
244
>
245
245
> See also [Client restrictions on the use of the @CurrentIteration macros](#current_sprint_restrict) earlier in this article.
246
246
@@ -251,7 +251,7 @@ Azure Boards adds a team parameter when you select the **@CurrentIteration** or
251
251
:::image type="content" source="media/query-date-iteration/at-current-with-team-parameter.png" alt-text="Screenshot that shows the Query filter by using the CurrentIteration macro with team parameter.":::
252
252
253
253
> [!TIP]
254
-
> If the `@CurrentIteration` macro isn't working, check that the expected iteration is selected for your team and that dates have been set for it. For more information, see [Select team sprints](../../organizations/settings/set-iteration-paths-sprints.md#select-team-sprints-and-set-the-default-iteration-path).
254
+
> If the `@CurrentIteration` macro isn't working, check that the expected iteration is selected for your team and that dates are set for it. For more information, see [Select team sprints](../../organizations/settings/set-iteration-paths-sprints.md#select-team-sprints-and-set-the-default-iteration-path).
255
255
256
256
To change the team parameter that the system automatically sets, choose it by entering the name of the team in the parameter field added below the **@CurrentIteration** macro.
257
257
@@ -268,7 +268,7 @@ To change the team parameter that the system automatically sets, choose it by en
268
268
Use the `@CurrentIteration +/- n` macro when you want to track the work a team planned for upcoming sprints and for understanding work that wasn't completed in previous sprints.
269
269
270
270
> [!NOTE]
271
-
> For the `@CurrentIteration +/- n` macro to work, the team must have selected iteration paths that meet the `+/- n`
271
+
> For the `@CurrentIteration +/- n` macro to work, the team must select iteration paths that meet the `+/- n`
272
272
> criteria. Date ranges must encompass the current date for the `@CurrentIteration`. For more information about team selection of iteration paths, see [Select team sprints and set the default iteration path](../../organizations/settings/set-iteration-paths-sprints.md#select-team-sprints-and-set-the-default-iteration-path).
273
273
>
274
274
> See also [Client restrictions on the use of the @CurrentIteration macros](#current_sprint_restrict) earlier in this article.
@@ -277,7 +277,7 @@ The following image shows how to list all User Story and Bug work item types tha
277
277
278
278
:::image type="content" source="media//query-date-iteration/sliding-window-iterations.png" alt-text="Screenshot that shows CurrentIteration plus and minus clauses.":::
279
279
280
-
To use this macro, the specified team must [select a set of sprints](../../organizations/settings/set-iteration-paths-sprints.md) that span the `+/- n` value entered for the macro.
280
+
To use this macro, the specified team must [select a set of sprints](../../organizations/settings/set-iteration-paths-sprints.md) that span the `+/- n` value entered for the selected macro.
281
281
282
282
::: moniker-end
283
283
@@ -312,16 +312,12 @@ FROM workitems
312
312
WHERE
313
313
[System.TeamProject] = @project
314
314
AND [System.WorkItemType] IN ('User Story', 'Bug')
315
-
AND [System.AreaPath] UNDER 'FabrikamFiber\Web'
315
+
AND [System.AreaPath] UNDER 'Fabrikam Fiber\Web'
316
316
AND NOT [System.State] IN ('Completed', 'Closed', 'Cut', 'Resolved')
317
-
AND NOT [System.IterationPath] = @currentIteration('[FabrikamFiber]\Web <id:cdf5e823-1179-4503-9fb1-a45e2c1bc6d4>')
0 commit comments