# Task boards

> Reuse · https://spoletta.com/docs/task-boards

A task board lays out the records of [shared structs](https://spoletta.com/docs/structs.md#shared-records) in columns, such as the Jira tickets still new beside the pull requests in review. As a flow or a person moves a record into another state, it shows in that state's column, so the board reads as the work going through your flows. Press **Play** and the board runs those flows on its records itself.

![The Customer bugs task board, playing, with the side menu hidden. Its header has the button that hides the side menu, Settings, Add column, Columns from states, Flows and Refresh, and reads Playing for Maya Okafor · 8 of 8 going, with At once 8 and Pause. The line above the columns reads 4 running in yellow and 4 waiting for a person in orange. Four columns: New 3, Triaged 19, Fixing 4 and Fixed 22. Each card shows its ID, such as CB-1281, its title, customer and priority, then its state, when it was last written and its run. In Triaged, cards bordered yellow read Running · Fix a customer bug: Fix, for 4m 44s, each with its run; in Fixing, cards bordered orange read Waiting for a person · Verify the fix: Verify. No run goes on New's or Fixed's cards.](https://spoletta.com/docs/task-boards-playing.webp)

*A task board playing with the side menu hidden: runs going on four records and four waiting for a person, each card naming its flow and step.*

## Making a task board

1.  **Make it from Home**
    
    On [Home](https://spoletta.com/docs/board.md#home), press **New** → **Task board** and name it, such as *Sprint*. Home lists task boards in a block of their own, each row with its columns' names, and **Task boards** in the side menu shows only them. The [palette](https://spoletta.com/docs/keyboard.md#the-command-palette) (Cmd-K) finds boards too, and a board's breadcrumb reads *Home / Sprint*. **Settings**, in the board's header, renames it and picks what its cards show; the palette has it as *Task board settings*.
    
    The board takes the window's width beside Home's side menu. The sidebar button just right of its name hides the menu, giving the columns all of it, and shows it again, as *Hide the side menu* and *Show the side menu* do in the palette. The browser remembers which, for every task board.
    
2.  **Add a column**
    
    Press **Add column** in the board's header, or **Add a column** on an empty board, and fill in the *Add a column* dialog, as the table below says. While you type the query, the dialog says how many of the struct's records it matches, such as *12 of the 40 records match*.
    
3.  **Add more**
    
    Add a column for each state you follow. A board can mix structs: *To do* can be Jira tickets in state `new` and *In review* pull requests in state `in_review`. Or press **Columns from states** in the header and, in the *Add columns from states* dialog, pick a struct and tick its states: a column for each, in order, with what moves its records on (see [Playing a task board](https://spoletta.com/docs/task-boards.md#playing-a-task-board)). The last state's column rests at first.
    

| Field | What it is |
| --- | --- |
| Name | What the column heads, such as *To do*. |
| Records of | One shared struct, from those you see. |
| Matching | A query in the same search bar and words as the struct's [Records page](https://spoletta.com/docs/structs.md#the-records-table), such as `state:new`, `-@priority:low` or words anywhere. Empty, it holds every record. |
| Order | *Latest written first*, or by any field either way: A to Z for text, lowest first for a number, oldest first for a time, such as a field typed Date and time, and back. |
| Moved on by | Which flow the board gives the column's records to while it plays: *The flow taking each record's state* (the default), a flow you name, or *None: its records rest here*. |
| At once, at most | How many of the column's records the board works on at once; *As many as the board runs* by default. |
| Place, from the left | Where the column stands on the board. |

To change a column, press the button beside its name, *Change the column*; the same dialog has **Take off the board**.

## What the cards show

What a card shows is the board's, for each struct its columns hold, so a struct's cards look the same in every column. Press **Settings** in the board's header: under the board's name, the dialog picks what each struct's cards show, under **Cards**, or **Cards of Jira ticket** and so on when the board holds several structs.

| Field | What it is |
| --- | --- |
| ID, at the top left | The field heading each card as its ID: the struct's key, its first unique attribute, unless you pick another. The ID always shows. |
| The ID links to | *Nothing: it opens the record*, or *The address in* a field holding the record's own page, such as the ticket's URL in Jira. The ID then shows as a blue link with a small external-link mark, and opens that address in a new tab. Only `http` and `https` addresses become links; any other value shows as plain text. |
| The other fields | Tick the fields to show, in order: the first ticked is the card's title, and the others show beneath it, each with its name. Then the record's state, when it was last written, and the run that last moved it on, as a link to it. |

-   Until you pick, a card shows the key, the first other field, the state and when it was last written.
-   A field typed Markdown, or text that reads as Markdown, shows on a card as the plain text it reads as, on one line.
-   A struct no column holds any more loses what its cards showed.

> **Link each card to its ticket:** Keep the record's own address in a field, such as a `url` attribute the flow fills in as it files the ticket. Then, in the board's settings, set **The ID links to** to that field and untick it from the fields shown.

## Working from the board

-   **Records move by themselves.** When a run or a person moves a record into another state, it leaves one column and shows in the next. The board fetches the latest every 10 seconds, or every 2 while it plays or runs go on its records; **Refresh**, in its header, fetches them at once. A column on a state a [scheduled](https://spoletta.com/docs/schedules.md) flow queries reads as that flow's queue.
-   **Click a card** to open the record and correct it, in the same dialog as on the Records page. See [Correcting records by hand](https://spoletta.com/docs/structs.md#correcting-records-by-hand). When its ID is a link, the ID opens the record's own page instead, and the rest of the card still opens the record.
-   **In a card's top right corner**, shown as the pointer comes over the card: the history button, *Show how this record got here*, opens the record on its History tab (see [A record's history](https://spoletta.com/docs/structs.md#a-record-s-history)), and **▶** starts a flow on that record (see [Running a flow on a record](https://spoletta.com/docs/structs.md#running-a-flow-on-a-record)).
-   **Add a record** at the foot of a column adds one starting in the state the column's query names.

> **Move a record by its state, not by dragging:** Cards can't be dragged between columns or ranked by hand: a column is a query, so change the record's state instead. A record that two columns' queries match shows in both. A column shows at most 200 cards, saying *200 of 340*; the Records page shows them all.

## Playing a task board

A board can move its records on itself. Press **Play** and it keeps giving every record its columns hold, that no run is going on, to the flow that takes it: a run per record, as **Run…** on the Records page starts one, for whoever pressed Play. The run takes the flow's [published](https://spoletta.com/docs/versions.md#publishing) version, or its board as it is while it publishes none, so publish a flow a board plays. The board reads *Playing for Ana · 2 of 4 going*, its runs going of **At once**, naming who pressed Play only when people sign in, and keeps playing, across restarts too, until someone presses **Pause**. Pausing starts no more runs; those going go on. It stops playing on its own, saying why, once whoever pressed Play is taken out of the [project](https://spoletta.com/docs/project-access.md#on-your-behalf) or only sees it, or the project is archived.

### Which flow takes a record

-   The one flow, of those whoever pressed Play may start on the struct's records, whose [query](https://spoletta.com/docs/procedural-links.md#looking-up-stored-records), or [pick](https://spoletta.com/docs/structs.md#each-run-works-on-one-record), names the record's state and whose rule holds of it. A flow picking its record takes the one the board gives it, and holds it while its run goes.
-   When no flow names that state, the one flow querying or picking the struct in any state.
-   When several do, none runs: the column's dialog says so, and asks you to pick one under **Moved on by**, and the **Flows** strip shows **Pick a flow** over it. A column that names a flow gives it every record it holds, whatever its state.
-   A record in a state no flow takes rests in its column, for a person to move on, or as done.

A column on the board shows only its name, how many records it holds, and its cards. To see which flow takes its records, press **Flows** in the board's header (see [Seeing which flows move records on](https://spoletta.com/docs/task-boards.md#seeing-which-flows-move-records-on)), or the pencil beside the column's name: under **Moved on by**, the dialog says, such as *While the board plays, each record here goes to File a ticket, the flow taking new, a run per record*. When the column names a flow that won't start, the dialog warns why: the flow was deleted for good, is in the trash, no longer queries the column's records, or isn't one whoever pressed Play sees or may run.

> **Let the Done column rest:** Pick *None: its records rest here* for a column the board should start nothing on, such as one of done records. Otherwise a flow querying any state takes those too.

### Seeing which flows move records on

Press **Flows** in the board's header, or *Show the flows moving records on* in the [palette](https://spoletta.com/docs/keyboard.md#the-command-palette), and a strip over the columns draws your records' way from state to state. Press it again, or *Hide the flows moving records on*, to hide it; the browser remembers which, for every task board.

![The Pull requests task board with Flows on, its button pressed and counting 1. Over the four columns, Draft, In review, Approved and Merged, the strip reads draft, then Prepare PR, then in review, then a yellow Pick a flow with dashed arrows on to approved and back over the boxes to draft, then approved, Merge PR and merged. Under Pick a flow: AI code review and Human review both take in review, so none starts. Beside merged: rests here: no flow starts.](https://spoletta.com/docs/task-boards-flows.webp)

*Flows on: each column's state, the flow moving its records on and where it leaves them, with In review's two flows asking for a pick.*

-   Over each column, its state in a box. Only a column whose query names exactly one state, as **Columns from states** makes them, gets one.
-   Between it and the next column, the flow its records go to while the board plays: the one the column names, else the one taking its state.
-   Arrows from that flow to the columns holding the states it leaves the records in. An arrow to the next column goes straight on; one going back, such as a review sending a pull request back to `draft`, or skipping columns arcs above the boxes.
-   Beside a column whose records rest, such as Merged above, *rests here: no flow starts*; beside one whose state no flow takes, *no flow takes closed*.

Where a flow leaves records comes from its processes taking the record: the states their output links to the struct's copy name, or decide between, or whose rules may hold. It reads the version the flow published, else its board as it is, and doesn't look into a procedure a subflow process runs. Under a flow, a line says what to look at:

-   *It leaves them in draft, where they stick*: no output link moves the records on, so each run ends [stuck](https://spoletta.com/docs/task-boards.md#running-and-stuck-cards). Give the flow one into the next state.
-   *It leaves them in archived, which no column holds*: the state has no column on the board, so no arrow shows.
-   *Triage takes new, so it starts nothing here*: the column names a flow that takes another state. Or, for a named flow the board can't start, why, such as *Triage is in the trash, so nothing starts*.
-   *Named by In review*, when the column names the flow it shows.

A column whose state several flows take, so the board starts none of them, shows a yellow **Pick a flow**, its arrows dashed to wherever each would leave the records, and a line such as *AI code review and Human review both take in review, so none starts*. The **Flows** button counts such columns, even while the strip is hidden.

Click a flow on the strip, **Pick a flow**, or what says no flow moves the records on, to pick the column's flow in place. The picker, *What moves In review on*, offers:

-   *The flow taking in review*, naming it, or saying *2 do, so none starts* or *None does, so its records rest*.
-   Each flow taking the state, with where it leaves the records, such as *Takes in review · leaves them in draft or approved*.
-   A flow the column names that takes another state, which starts nothing here.
-   *None: its records rest here*.

**Save** keeps it as the column's flow, the same setting as **Moved on by** in the column's dialog, as the picker says: *Kept as In review's flow, which its pencil changes too*. If the board refuses it, the picker says why in place.

![The same board with the picker open under Pick a flow, titled What moves In review on. It says AI code review and Human review both take in review, so while the board plays it starts none of them on In review's records, and asks to pick the one it starts. The options are The flow taking in review, reading 2 do, so none starts in yellow; AI code review, chosen, and Human review, each reading Takes in review · leaves them in draft or approved; and None: its records rest here. Beneath: Kept as In review's flow, which its pencil changes too, with Cancel and Save.](https://spoletta.com/docs/task-boards-flows-picker.webp)

*Picking AI code review as the flow moving In review's records on.*

> **No arrow out means stuck:** Turn the strip on once a board's columns are laid out from states: every state a flow takes should have an arrow on to the next, and no column should show Pick a flow. A flow drawing no arrow out leaves its records where they were.

### How many at once

**At once**, beside Play, caps how many of the board's runs go at the same time, and a column can cap its own under **At once, at most**. The rightmost columns go first, so work nearer done finishes before new work starts.

### Running and stuck cards

Above the columns, the board counts its records being run, waiting for a person, retrying and stuck, such as *2 running*, *1 waiting for a person*, *1 retrying* and *1 stuck*, in yellow, orange, grey and red, or reads *Nothing running*. A record two columns hold counts once, so columns scrolled out of sight still show there.

-   A card being run pulses with a yellow border, as a process running on a flow's [board](https://spoletta.com/docs/running.md#reading-the-board-during-a-run) does, and one waiting for a person has an orange border, as a human step waiting there does. Its foot reads like *Running · Triage: Classify · for 12s · run #41*, with a pulsing dot and a link to the run. While the board plays or runs go, the page refreshes every 2 seconds. Someone who can't see the flow doesn't see its name or steps.
-   A record is **stuck** when its run fails, is stopped, or ends done leaving the record in the state it took it in, and when the board started it from the same state 5 times with no person in between. Its card is bordered red, whatever left it so, and its foot says why, such as *Stuck: its run failed*, *its run left it here* or *it went round too often*, with a link to the run; point at it for what to do. The board skips it until someone presses **Try again** on the card, or corrects the record by hand. A column can first try it again on its own: see [Columns that try again](https://spoletta.com/docs/task-boards.md#columns-that-try-again).

### Columns that try again

Some runs fail for a while and then succeed, such as a flow moving on a pull request whose checks are still going. In the column's dialog, tick **Try a record again when its run fails or leaves it here**, and set *every* how many minutes (1 to 1440) and *at most* how many times (1 to 100). A *Draft* column of pull requests might try every 3 minutes, at most 10 times. A column whose records rest, starting no runs, can't try again.

-   A record whose run failed, or ended done leaving it in the same state, waits that long after the run ended, then goes again. A run that was stopped or interrupted is never tried again on its own.
-   While it waits, its card is grey with a dashed border and counts down, such as *Retry in 2:41*, with which try is next, such as *retry 2 of 3*, how the last run left it, a link to that run, and **Retry now**. Once due it reads *Retrying…*; on a paused board, *Paused · retry due in …* or *Paused · retry due now*.
-   Out of tries, the card is stuck, bordered red, such as *Stuck: its run failed* and *no retries left (3 of 3)*, with **Try again**.
-   **Try again**, correcting the record by hand, or running a flow on it with the card's ▶ starts its tries anew. A run started from the card is the first try, so if it fails the card reads *retry 1 of 10* after the wait; the run dialog says so, and the run's log says it was started from its card on the task board.
-   A column's tries in a row count as one round, so trying more than 5 times doesn't leave the record stuck as *it went round too often*.

![The Pull requests task board playing, summarised as 1 running and 1 retrying. In the Draft column, PR-145 Add dark mode to settings is running Check bugs: Check, run #1, with a yellow border, and PR-142 Checks still running on CI is grey with a dashed border, reading Retry in 2:52, retry 2 of 3, its run failed, run #3 and Retry now. The Ready column holds PR-137 and PR-139, resting.](https://spoletta.com/docs/task-boards-retrying.webp)

*A column trying a record again: its card counts down to the next try.*

### Flows a board plays

A lifecycle, such as an exception that is `new`, then has a ticket filed, a pull request opened and merged, is one flow per step, each taking the state its step starts from, with a column per state.

-   A flow meant for one step queries its struct in that step's state, once, and has an output link leaving the record in the next state. Otherwise the record ends stuck, and the [Flows](https://spoletta.com/docs/task-boards.md#seeing-which-flows-move-records-on) strip draws no arrow out of its state. If the step makes a record of another struct, such as an exception filing a ticket, it still moves the one it took on, such as to `ticketed`.
-   A state that waits on the world outside, such as a pull request in review until someone merges it, is one no flow takes. Its records rest until a [webhook](https://spoletta.com/docs/webhooks.md)'s or a schedule's run moves them on.
-   Don't also [schedule](https://spoletta.com/docs/schedules.md) a flow the board plays on the same state: its runs may take the records the board's runs are working on.

## Who sees a board

A task board belongs to a person, a team or everyone, as a flow does: pick it with the owner picker on its row on Home. Everyone who sees a board may change it.

-   A column shows its records only to those who see its struct. Otherwise it says why: the struct isn't one you see, it is in the trash, it was deleted for good, or it no longer shares its records.
-   Deleting a board, from its card, asks first and can't be undone. Its columns go with it; the records stay on their structs' Records pages.
-   A team that owns task boards can't be deleted until they belong to someone else.

> **Not part of a flow:** Task boards aren't in a flow's [versions](https://spoletta.com/docs/versions.md) or its [setup file](https://spoletta.com/docs/setup-files.md), so exporting and importing a flow leaves them out.
