A release checklist: everything to look at before a version is committed or shipped, one box per item -- or one per item and per member, when the team checks it together.
class MMO\admin\helpers\Checklist
Espace de noms
MMO\admin\helpers
Kept in a JSON file of its own, `{folder}/{name}.json` ([`ChecklistController`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller)):
{"version": 4, "updatedAt": "...", "title": "my.oviepro 4.1: review before commit", "description": "...",
"board": "my.oviepro-deploy", "boardUrl": "boards/oviepro-deploy", "members": [],
"recipe": {...}, // how [`ChecklistBuilder`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder) makes the items
"types": {"pdf": {"label": "PDF and printing", "icon": "file-pdf"}}, // what each `kind` is called, and its icon
"groups": {"General": {"icon": "globe"}}, // a group's icon
"refPrefix": "R421-", "lastRef": 12, // what the items' refs start with, the last number given
"items": [{id, ref, group, section, kind, title, detail, url, note, tickets, recheck, action}, ...],
"checks": {"<item id>": {"<member, or *>": {"at": "...", "by": "marc"}}},
"runs": {"<item id>": {"at": "...", "by": "marc", "exitCode": 0, "passed": true, "duration": 21.4}}, // an action's last ▶
"decisions": {"<item id>": {"at": "...", "by": "marc", "option": "..."}}, // what a decision item's button chose
"release": {"name": "4.1", "startedAt": "...", "startedBy": "marc"}, // the round being checked
"history": [{name, startedAt, startedBy, closedAt, closedBy, done, total}, ...]} // the rounds before, last first
- An item's `id` is the hash of its group, section and title ([`ItemId`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-itemid)): items are rebuilt whenever the code
changes, and what was checked stays checked while its item is still there.
- An item's `ref` is what people call it by (`R421-12`, [`AssignRefs`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-assignrefs)): `refPrefix` and a number, shown beside its
title. Unique in the checklist and never given twice (`lastRef` only grows), it stays the item's while the item is
there -- a rebuild keeps it, an item file may give it (a release carries the refs of the checklist it comes from).
- `group` is what the page folds (a library, "pages", "before committing"), `section` a heading inside it (a
folder, a page), `kind` what the item is (`code`, `page`, `global`...), `url` where to look.
- `tickets` are the ids of the board's tickets the item verifies. A ticket all of whose items are checked is
verified ([`tickets`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-tickets)): it gets a label on the board, and can then be moved to done.
- Without `members`, an item has one box (`*`). With them, it has one per member, and is done once all are checked.
- A checklist is checked again at each release: the first check starts the round (`release`), [`reset`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-reset) closes it
-- every box unchecked, a line of `history` saying how far it got. [`startRound`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-startround) does it when the items file asks
for a round the checklist is not at (its `round`, [`ChecklistBuilder::meta`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-meta)): the release that brings it starts it.
- `recheck` is what an item asks to be checked again for (a version, `4.2.9`): a rebuild bringing a `recheck` the item
did not have unchecks its boxes, the others' stay -- a release that touched a page asks its checks again, only them.
- `note` is a word on the item's section (a page's), `types` and `groups` how the page shows kinds and groups.
- `action` is how the item is checked in one click ([`NormalizeAction`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-normalizeaction)): a diff to read (`diff`), a page to open
with its steps (`page`), a command the server runs (`run`), a choice to make (`decision`), something only a person
can do (`manual`); null for none.
Replace the items: what was checked stays checked when its item is still there, and keeps its ref -- unless the item asks to be checked again (a recheck it did not have).
An item's action, checked: what the page offers to check it in one click.
static function NormalizeAction(mixed $action, ?array &$errors = null): ?array- `{type: "diff", repository, path?, from?, to?}`: the changes to read in `<mmo-diff>` -- `repository` a label of
the recipe's `repositories`, `from` the old revision (`HEAD` when none), `to` the new one (none: the working tree);
- `{type: "page", url, as?, steps: [...]}`: the page to open, as whom -- a profile of the recipe's `accounts` (its
key: the page opens it in that test account's session, [`TestAccounts`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/TestAccounts.md#testaccounts)), else the words of the check (« an
account limited to a group ») --, and what to do and see there, step by step;
- `{type: "run", command, expect?, match?, notMatch?, cwd?}`: a command the server runs when it is on its list
([`ChecklistController::$run`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller)), in `cwd` (a label of the recipe's `repositories`); the item
is checked when it ends with 0, its output holds `match` (a text, or a `/regular expression/`; without one,
`expect`) and not `notMatch`. `expect` is what a person reads (« 78 à rattacher… »), `match` what the machine
finds ([`ChecklistBuilder::DeriveMatch`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-derivematch) gives one by family of command);
- `{type: "decision", ticket, question, options: [...], asked?}`: a choice, posted on the ticket; `asked` the date it
was asked: a decision posted on the ticket since answers it;
- `{type: "manual", command?, steps?, as?}`: what only a person can do (a server, a console): a command to copy, steps;
`as` the account a request is sent as (a profile, as a page's).
string, ref: string, group: string, section: string, kind: string, title: string, detail: string, url: ?string, note: string, tickets: list<string>, recheck: string, action: ?array}> every item with every key, its id computed when it has none; an item without a title is dropped, an action that is not valid too (NormalizeAction) -- the item stays, without it
Replace the items: what was checked stays checked when its item is still there, and keeps its ref -- unless the item asks to be checked again (a recheck it did not have).
Start the round $name unless the checklist is at it already: what an items file asking for a new round does (ChecklistBuilder::meta). A checklist nobody checked yet is only named, without a line of history.
function startRound(string $name, string $by): bool
array{title: string, status: string, total: int, checked: int, verified: bool}> each ticket the items name, with how many of its items are done; one the board does not have is left out when $tickets is given