Skip to content

Commit 37321ac

Browse files
Merge pull request #8195 from MicrosoftDocs/users/chcomley/uuf-473658
UUF fix - Update Boards/queries/query-by-date-or-current-iteration.md
2 parents 6c64326 + d6b73ce commit 37321ac

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

docs/boards/queries/query-by-date-or-current-iteration.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.author: chcomley
99
author: chcomley
1010
ms.topic: example-scenario
1111
monikerRange: '<= azure-devops'
12-
ms.date: 10/15/2024
12+
ms.date: 08/07/2025
1313
#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.
1414
---
1515

@@ -240,7 +240,7 @@ If your team follows Scrum processes, you schedule work to be completed in sprin
240240
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.
241241

242242
> [!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.
244244
>
245245
> See also [Client restrictions on the use of the @CurrentIteration macros](#current_sprint_restrict) earlier in this article.
246246
@@ -251,7 +251,7 @@ Azure Boards adds a team parameter when you select the **@CurrentIteration** or
251251
:::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.":::
252252

253253
> [!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).
255255
256256
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.
257257

@@ -268,7 +268,7 @@ To change the team parameter that the system automatically sets, choose it by en
268268
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.
269269

270270
> [!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`
272272
> 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).
273273
>
274274
> 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
277277

278278
:::image type="content" source="media//query-date-iteration/sliding-window-iterations.png" alt-text="Screenshot that shows CurrentIteration plus and minus clauses.":::
279279

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.
281281

282282
::: moniker-end
283283

@@ -312,16 +312,12 @@ FROM workitems
312312
WHERE
313313
[System.TeamProject] = @project
314314
AND [System.WorkItemType] IN ('User Story', 'Bug')
315-
AND [System.AreaPath] UNDER 'FabrikamFiber\Web'
315+
AND [System.AreaPath] UNDER 'Fabrikam Fiber\Web'
316316
AND NOT [System.State] IN ('Completed', 'Closed', 'Cut', 'Resolved')
317-
AND NOT [System.IterationPath] = @currentIteration('[FabrikamFiber]\Web <id:cdf5e823-1179-4503-9fb1-a45e2c1bc6d4>')
318-
AND (
319-
EVER (
320-
[System.IterationPath] = @currentIteration('[FabrikamFiber]\Web <id:cdf5e823-1179-4503-9fb1-a45e2c1bc6d4>')
321-
)
322-
AND [System.IterationPath] = @currentIteration('[FabrikamFiber]\Web <id:cdf5e823-1179-4503-9fb1-a45e2c1bc6d4>') + 1
323-
AND [System.ChangedDate] >= @today - 30
324-
)
317+
AND NOT [System.IterationPath] = @currentIteration('[Fabrikam Fiber]\Web <id:00aa00aa-bb11-cc22-dd33-44ee44ee44ee>')
318+
AND EVER [System.IterationPath] = @currentIteration('[Fabrikam Fiber]\Web <id:00aa00aa-bb11-cc22-dd33-44ee44ee44ee>')
319+
AND [System.IterationPath] = @currentIteration('[Fabrikam Fiber]\Web <id:00aa00aa-bb11-cc22-dd33-44ee44ee44ee>') + 1
320+
AND [System.ChangedDate] >= @today - 30
325321
ORDER BY [System.Id]
326322
```
327323

0 commit comments

Comments
 (0)