# One board across several teams' sprints

Two teams are working on the same program, each in its own sprint, on its own
schedule. The delivery manager wants a single board showing what both are
working on **right now**, and every Monday the answer changes, because the
sprints roll.

Native Azure Boards cannot give them that board. A board belongs to exactly one
team, so two teams mean two boards, and no native view unions them. A **query**
has no such boundary: Azure DevOps can resolve each team's current sprint by
name, and AnyKanban makes the query the board.

This guide assumes you have read the [Prerequisites](https://anykanban.com/docs/prerequisites/) and the
[User Guide](https://anykanban.com/docs/user-guide/).

## The query

The `@CurrentIteration` macro takes a **team** parameter, so one clause per
team, OR-ed together, is the whole trick:

```
Team Project    = @Project
Iteration Path  = @CurrentIteration('[Contoso]\Payments')
   OR
Iteration Path  = @CurrentIteration('[Contoso]\Claims')
```

You do not have to type that as raw WIQL. In the query editor, choose
**@CurrentIteration** as the value for Iteration Path and a team picker appears
beneath it; add the second clause and group the two with **Or**.

Three things worth knowing, the first two verified against the service:

- **The plain team name is enough.** The editor stores a GUID alongside it,
  but the name alone resolves.
- **The teams may live in different projects.** Put each project in its own
  brackets, as `@CurrentIteration('[Claims Platform]\Intake')`, and remove the
  `Team Project = @Project` clause so the query is allowed to leave its project.
  Turn on **Query across projects** as described in
  [One board across several projects](https://anykanban.com/docs/guide-cross-project-boards/).
- **Sort by your order field, or not at all.** Leave the query without an
  `ORDER BY`, or end it with `ORDER BY` your process's order field ascending,
  so the board, the List view and the query results show the same order. A
  query sorted by anything else shows that order and reordering is off, as the
  [User Guide](https://anykanban.com/docs/user-guide/) explains.

Point a board at that query and you have one wall showing both teams' live
sprints, with your columns, WIP limits and card styling over the top.

## The catch: a team between sprints breaks the board

This is the one thing to understand before you rely on it.

If **any** team named in the query has no current iteration Azure DevOps can
resolve, Azure DevOps does not quietly return fewer rows. It **fails the entire
query**, and the board that depends on it cannot load. We measured this for a
team with no iterations selected at all and for a team name the service does
not recognize. A team whose selected sprints leave a gap around today was not
measured, so expect the same failure. One team in that state therefore takes
the other team's cards with it. To stay safe, keep an iteration whose dates
cover today selected for every team the query names.

That is a property of the platform, not of AnyKanban, and it is why the board
tells you plainly what happened rather than showing an empty column or a
generic failure:

- **On load**, the board names the team that has no scheduled sprint and says
  that no cards can be shown until it has one.
- **While you are working**, if a sprint rolls over and the next one has not
  started, the board **keeps the cards it last read** and warns you that it has
  stopped refreshing and why. What you are looking at stays true as of that
  moment. It simply is not live any more.

The fix is the same in both cases, and it belongs to the team that is between
sprints: give it an iteration whose dates cover today (Project settings →
Project configuration → Iterations, then select it for the team under Team
configuration → Iterations).

**If your sprints have gaps by design**, do not use the macro. Name the
iteration paths explicitly:

```
Iteration Path  UNDER  Contoso\Payments\2026
   OR
Iteration Path  UNDER  Contoso\Claims\2026
```

That board never breaks between sprints. It simply shows a wider window, and
you edit the query when the year turns.

## A variant: teams by area instead of sprint

If the two teams are separated by **area path** rather than by sprint, the same
shape works with `@TeamAreas`, which resolves the areas a team owns:

```
Area Path = @TeamAreas [Contoso]\Payments
   OR
Area Path = @TeamAreas [Contoso]\Claims
```

This one has no sprint dependency at all, so it has none of the fragility
above, which makes it the better choice whenever "what these two teams own" is
closer to the question than "what these two teams are in right now".
