Judge each scholarship's program status at its own training - #2367
Merged
Conversation
The New / Ongoing / Reinstated column judged every award against today, via Organization#program_status → Affiliation#active?. So a 2018 award showed the program's status *now*: an org that has since lapsed read Reinstate on a row where it was plainly Ongoing at that training, and the value moved silently as affiliations changed underneath it. Anchor each row on the start date of the training it paid for instead. That means routing through FacilitatorProgramStatus, which ADR-0001 D4 already names as the one rule for this word — the scholarship index was the last surface computing it ad hoc, and the only one that could disagree with the event reports and org profile chips about the same program on the same day. Hover text names the anchor and the reasoning. An award with no registration behind it (grant-first, or funding a CE registration) keeps the year anchor, labelled "no event in view". Organization#program_status had no other caller, so it goes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The seed summary exceeded Feature's 300-char maximum, so import! raised RecordInvalid — failing the catalog seed-validity spec and returning 422 from POST /features/import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The entry describes the scholarship index, so it belongs beside the other scholarship features on /features — filed under Events & trainings it was invisible to anyone filtering by the area it actually ships in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
🤖 suggested review level: 3 Read 📖 one column's rule swapped to the canonical service; no shared semantics touched
Split out of #2336 so it can ship on its own — it fixes a live bug and doesn't depend on that PR's
active?/.activechange.Why
Organization#program_status→Affiliation#active?).What
Scholarship#event(allocation → event registration).FacilitatorProgramStatus, which ADR-0001 D4 already names as the one rule.Organization#program_status(recipient)deleted; it had no other caller.Notes for reviewers
Scholarship#eventresolves through the preloadedrecipient.event_registrations, notallocation.allocatable— a polymorphic preload can't reach the event, so walking the allocatable cost a query per row.recipient_must_match_allocation_registrantguarantees the funded registration belongs to the recipient. Verified: 0 per-row queries on the index scope.<anchor (ADR-0001 D8) means a first-time org still reads New at its own training — the affiliation that training minted starts on the anchor, so it doesn't count as prior history.Tests
Scholarship#eventwith and without an allocation.