fix(pupil-dossier): use schema slugs, and _limit, in the timeline view - #627
Closed
rubenvdlinde wants to merge 1 commit into
Closed
fix(pupil-dossier): use schema slugs, and _limit, in the timeline view#627rubenvdlinde wants to merge 1 commit into
rubenvdlinde wants to merge 1 commit into
Conversation
PupilDossierTimelineView asked OpenRegister for six schemas by their
PascalCase TITLE. The value goes into the URL path verbatim:
/apps/openregister/api/objects/learniq/DossierNote
OpenRegister resolves that segment against the slug the register
declares - `dossier-note` - so every one of the six 404s. This is what
learniq's e2e has been red on:
[PupilDossierTimelineView] loadAll error
Error: DossierNote fetch failed: 404
Only ONE of the six ever appeared in that message, because Promise.all
rejects on the first failure. All six were broken:
DossierNote -> dossier-note
BehaviourIncident -> behaviour-incident
WellbeingCheckIn -> wellbeing-check-in
LearningPlan -> learning-plan
SupportRequest -> support-request
DeliberationRecord -> deliberation-record
Single-word titles happen to survive this (Portfolio -> portfolio), which
is why the same pattern elsewhere in src/ is fine and why this stayed
hidden: it only bites where the title has more than one word.
Second defect in the same method: the DeliberationRecord call passed
`limit=500` without the underscore. A bare control param is applied by
OpenRegister as a PROPERTY filter, so it asks for rows whose `limit`
field equals 500 and returns an empty list with HTTP 200 - no error, no
deliberations, silently. `learnerQuery` a few lines above already used
`_limit=200`; this one call did not.
Also corrects the fetchSchema docblock, which told the next caller to
pass a title.
Contributor
Author
|
Closing in favour of #629. Another session had already opened #622 for the same file, covering the five lookups inside the Promise.all block — I merged that one. #629 carries only what it missed: the sixth lookup ( |
Contributor
Quality Report — ConductionNL/learniq @
|
| Check | PHP | Vue | Security | License | Tests |
|---|---|---|---|---|---|
| lint | ✅ | ||||
| phpcs | ✅ | ||||
| phpmd | ✅ | ||||
| psalm | ✅ | ||||
| phpstan | ✅ | ||||
| phpmetrics | ✅ | ||||
| eslint | ✅ | ||||
| stylelint | ✅ | ||||
| build | ✅ | ||||
| check-specs | ✅ | ||||
| format | ✅ | ||||
| check-l10n-js | ✅ | ||||
| check-schema-l10n | ✅ | ||||
| composer | ✅ | ✅ 104/104 | |||
| npm | ✅ | ✅ 650/650 | |||
| app:check-code | ⏭️ | ||||
| info.xml | ✅ | ||||
| REUSE | ❌ | ||||
| PHPUnit | ✅ | ||||
| Newman | ⏭️ | ||||
| Playwright | ✅ | ||||
| Hydra gates | ✅ |
Quality workflow — 2026-08-26 23:21 UTC
Download the full PDF report from the workflow artifacts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
learniq's
developmentE2E has been red on one spec —pupil-dossier.spec.ts:166, "resolves the registered component ... not a blank/404 shell". This is why.Defect 1 — titles where slugs belong
PupilDossierTimelineView.fetchSchema()puts its argument straight into the URL path:OpenRegister resolves that segment against the slug the register declares. All six calls passed the PascalCase title:
DossierNotedossier-noteBehaviourIncidentbehaviour-incidentWellbeingCheckInwellbeing-check-inLearningPlanlearning-planSupportRequestsupport-requestDeliberationRecorddeliberation-recordOnly one ever surfaced in the error, because
Promise.allrejects on the first failure — so the log namedDossierNoteand the other five stayed invisible.Why this hid for so long: a single-word title survives the round trip (
Portfolio→portfolio), so the same pattern elsewhere insrc/is genuinely fine. It only bites where the title has more than one word. I sweptsrc/for multi-word PascalCase in an objects URL — this view was the only live case (LessonProgressinLessonPlayer.vueappears solely in comments).Defect 2 — a bare control param in the same method
The
DeliberationRecordcall passedlimit=500without the underscore. OpenRegister applies a bare control param as a property filter, so that asks for rows whoselimitfield equals 500 and returns an empty list with HTTP 200 — no error, no deliberations, silently.learnerQuerythree lines above already used_limit=200; this one call did not.Verification
lib/Settings/learniq_register.json— all six presentThe docblock also told the next caller to pass a title ('e.g. "DossierNote"'); corrected.