Documentation

Jumping Access · Equipe Extensions

Masterlist Draw — Equipe extension

Draws the riders of a masterlist imported into Equipe, then gives each rider's horses consecutive head numbers, starting from a start number you choose (1 for young horses, 200 for the CSI2*, and so on).

Rule applied — FEI JRs 276.2.3: the athletes are drawn and their horses carry successive numbers (first athlete: 1, 2, 3 — second athlete: 4, 5…).

Shows running over several weeks: horses already entered in an earlier masterlist keep their head number, only the newcomers are numbered — unless the operator asks for a full renumbering.

The interface is in English and sized for Equipe's modal window (compact layout, sticky action bar at the bottom, no back button: the modal closes with its own Close button).

Recognising a masterlist

An Equipe masterlist has z == "L" and allow_many == false, exactly like an ordinary class: neither field discriminates. The extension proceeds as follows:

  1. classes quote their masterlist in master_list_ids: any class quoted that way is a masterlist (this also gives the number of classes attached to it);
  2. feiid: a masterlist carries the FEI event id, in six segments — 2026_CI_0241_S_S_02 — where a competition carries seven (2026_CI_0241_S_S_02_01). A structural criterion, independent of the name;
  3. fallback: a name (clabb / klass) containing “masterlist” — masterlist_name_regex. Safeguard: as soon as the show fills in feiids, a class without a feiid is never promoted to masterlist by its name alone (the CSI2* Qualif and VETSched cases);
  4. the drop-down always works: two groups, Masterlists then Other classes (tick Show all classes). If nothing is recognised, every class is listed straight away with a message.

Each line shows how many classes are attached and how many horses the masterlist holds (computed from competition_ids in horses.json, without an extra request): a masterlist is also recognisable by its size.

Masterlists are sorted by date and grouped into weeks. The first three segments of the feiid (2026_CI_0241) are the FEI id of the week: when present they prevail, otherwise the gap between dates is used (week_gap_days, 2 days by default). Weeks are numbered in chronological order of appearance, never by the value of the id — the ids of a tour do not follow one another (2026_CI_0241, then 2026_CI_1149). The selector shows W1 · CSI1-Masterlist (23/11) — 12 classes · 96 horses.

Same series from one week to the next: each week of a tour is a separate FEI event and its competition numbering restarts, so the S_S_02 suffix does not necessarily point at the same series the following week. The pairing is therefore made first on the series read in the name (CSI1, CSI2, CSIO5, CSIYH1… — a week prefix such as W2 is ignored), and only failing that on the FEI suffix. That masterlist is what defines “this series” when the kept head numbers are grouped, and the screen states it: same series as CSI1-Masterlist (23/11).

Walkthrough

  1. Masterlist — pick it from the list.

  2. Numbering mode:

    • Number new horses only (the default as soon as a horse has been seen in an earlier masterlist): returning horses keep their number, newcomers take the first free numbers — each rider's block stays consecutive and numbers already in use are skipped;
    • Renumber everything: full draw, consecutive blocks from the start number. A red banner counts the horses from previous weeks whose head number would change.

    In both modes, a number already carried by a horse of the show that is not being renumbered here (horses.json) is unavailable: the allocation skips it, so no head number can ever be given twice.

  3. Series starts at — proposed automatically: the smallest kept number (the series already in place). New horses take the first free numbers from there.

  4. Draw — Fisher–Yates with random_int (CSPRNG); the draw id and timestamp are stored in the snapshot. A rider's own horses can keep the masterlist order, be sorted alphabetically, or be drawn as well.

  5. Check — colour code: blue = new number, grey = head number kept from this series, orange = kept, but coming from another masterlist. Riders whose horses all keep their numbers are grouped apart. Dragging a rider or using ▲▼ recalculates every number live. Clicking a number switches that horse between “keep” and “renumber into the series”.

  6. Review before writing — a window listing every change (old → new), the counters and the warnings: horses from previous weeks changing number, possible duplicates. Nothing is written before an explicit confirmation.

  7. Writing — the head number on the horse record (PATCH /horses/{hnr}), then horse_no, st and ord on the masterlist entries (PATCH /competitions/{kq}/starts/updates). st receives the head number (st_value = 'number', or 'ord' to put the rank there). Only horses whose number changes are rewritten on the horse record. Everything travels under the same X-Transaction-Uuid: in Equipe it is a single block, undoable from the activities.

  8. Undo — a snapshot (numbers + order) is written to data/snapshots/ before each apply; the Undo button restores it. The last ten applies are kept per masterlist and can be undone one after the other.

Horses already present, and where head numbers come from

A freshly imported horse receives an automatic number from Equipe (the highest number in the show plus one), which usually lands far from the series. To tell a genuine newcomer from a horse that already has a head number, the extension reads competition_ids in horses.json — one request for the whole show.

Two distinct questions:

  • was it already here? — any earlier competition is enough (a class, a qualifier, a vet inspection): the horse has already competed under that head number, so the number is kept;
  • which series does its number come from? — only a masterlist answers that.

A horse with no earlier entry is new and receives a number from the series. A horse that was already here but appears in no earlier masterlist keeps its number (it has already competed with it); a neutral line points it out, with a button to renumber it anyway.

A number is not judged by its value but by the masterlist it comes from. Each kept horse shows its masterlist of origin next to its number (“kept · from CSI1-Masterlist (23/11)”); no class name is ever displayed, classes are never treated as a series. Kept head numbers are grouped like this:

  • the current series is the group coming from the masterlist carrying the same series in its name (same series, earlier week); failing that, the largest group, and on a tie the one whose numbers are closest to the series start;
  • the other groups (masterlists of another series) are flagged in orange, each with its range of numbers and a “Renumber these N” button. Clicking a single number does the same for one horse;
  • horses already present without a masterlist of origin are not flagged orange: they keep their number, on a separate information line.

Nothing is decided automatically: a horse from another series legitimately keeps that series' number — the operator decides.

If horses.json does not expose competition_ids (older Equipe), the extension falls back on reading the entries of the earlier masterlists.

Worth knowing

  • A head number is global to the show: changing it affects every week and every class. Hence the “new horses only” default and the mandatory confirmation.
  • Horses entered after the draw: picked up automatically when applying, in their rider's block if that rider was drawn, otherwise at the end of the list; the screen says so.
  • Head number field: detected from horses.json (num / nr). If Equipe rejects the field, the extension retries once with the other name and remembers the one that worked, so the undo writes to the same place. It can be forced with horse_number_field in config.php.
  • write_st = true by default: st follows the head number. Switch st_value to 'ord' (or write_st to false) in config.php if you need otherwise.

Scope — deliberately limited to masterlists

Classes stay in Equipe. Riders declare their starters the day before, so the field of a class is only known when declarations close: the starting order and the rotation must be computed at that moment, in Equipe, on the real field.

What this extension provides is the input that makes the rotation work. Because a rider's horses carry consecutive numbers, the rider sits entirely inside one rotation slice, whichever horse he declares that day. With scattered numbers (45, 69, 10) the same rider can end up early every day — and can even choose his slot by choosing which horse he declares.

The rotation itself (FEI JRs 276.2.1 to 276.2.3: the number of athletes divided by the number of individual competitions or of days) is applied in Equipe, as is the Grand Prix draw, which under 276.3 needs its own draw in front of the President of the Ground Jury.

Tests

Validated end to end against a fake Equipe server reproducing a two-week show (two masterlists, returning horses, a horse outside the masterlist): detection through master_list_ids, through feiid (six segments) and by name among 14 other classes; weeks derived from the FEI ids, including ids that do not follow one another; same series recognised across weeks from the name when the FEI suffix had changed; uniformity of the draw (60,000 draws); numbering from 1 and from 200; head numbers kept in week 2 with the new numbers continuing the series; full renumbering mode; num → nr field fallback; horses added after the draw; no duplicate head number (numbers from horses.json skipped in both modes); writing and restoring st / horse_no / ord; two successive undos; invalid token; empty masterlist. Multi-week behaviour validated on competition_ids: a returning horse recognised from its earlier entries; a horse from another masterlist (CSI2* series at 249–250) grouped by origin then renumbered on request, individually or by group; a horse that had already started in a class without appearing in any masterlist (no. 900) kept, flagged separately and renumberable on request. Rendering checked at the real size of the Equipe modal (850 × 470).

Masterlist.md Last update: 22/08/2026 à 08:28