Files
xamxam/TODO.md
Pontoporeia 021c58925e fix: auto-regenerate thesis identifier on any year-prefix mismatch, support .php migrations in runner
ThesisEditController::save() previously only regenerated the identifier when
the year field changed during an edit. If a thesis had its year corrected in
a past edit (or via other means) and the identifier still carried the old
year prefix, subsequent edits that didn't touch the year field would leave
the mismatched identifier in place.

Now saves() also checks whether the existing identifier's 4-digit prefix
matches the thesis year, and regenerates if not — regardless of whether year
changed in the current edit.

The migration runner (run.php) only scanned for .sql files, so PHP migrations
(013, 016, 018, 038) were never auto-applied. Extended the runner to also
discover and execute .php migrations in a subprocess. If a PHP migration fails
with an idempotent error (no such column, already exists, duplicate column),
the runner treats it as already-applied and continues rather than aborting
— preventing a stale migration like 016 (banner_path already dropped by 028)
from blocking migrations that come after it alphabetically (e.g. 038).

Updated migrations 016 and 038 to accept an optional $argv[1] DB path.
Fixed 016 to gracefully handle the banner_path column already being gone
(exit 0 instead of fatal).
2026-06-10 00:17:30 +02:00

1.8 KiB

TODO

  • Fix #1: TFE publié se dépublie quand on modifie ses données (is_published missing from getThesisRawFields SELECT)

  • Fix #2: Renommer "Note contextuelle" → "Note contextuelle relative à soutenance"

  • Fix #3: Impossible de mettre une majuscule au nom d'étudiant·e — la recherche par nom en SQLite est case-sensitive (BINARY), contournait le UPDATE et tombait dans le fallback email sans updater le nom. Ajout COLLATE NOCASE + UPDATE dans le chemin email.

  • Fix #4: Décorréler contact interne et contact visible (ajouter colonne contact_visible sur theses)

  • Fix #5: "Contact public : non" partout, non modifiable, sans impact

  • Fix #6: Investiguer "libre → interne" impossible — aucune restriction trouvée dans le code admin

  • Hotfix: contact_visible manquant dans le SQL de updateThesis (l'edit matchait createThesis à la place)

  • Fix #7: Options de licence non persistées en edit — HTMX load trigger perdait les valeurs

  • Fix #3 (v2): findOrCreateAuthor avec cascade ID → nom → email, setThesisAuthors passe les IDs existants

  • Migration 038: corriger les identifiers theses qui ne matchent pas leur année

  • Filtres finalité + format dans la page de recherche (search.php)

  • Styliser boutons Filtrer/Réinitialiser : plus compacts, Réinitialiser en neutre

  • Commit + jj new

  • Fix identifier-year mismatch: extend save() to regenerate identifier when prefix doesn't match year (not just on year change)

  • Fix migration runner run.php to support .php migrations alongside .sql

  • Fix runner: treat PHP subprocess idempotent errors (no such column / already exists) as skippable rather than fatal

  • Update 016 and 038 PHP migrations to accept $argv[1] DB path

  • Fix migration 016 to gracefully handle banner_path column already being dropped

  • Commit + jj new