Skip to content

Deferral flow can move a participant to a different course when registration course link and round disagree #2792

Description

@Will-Howard

🧩 Summary

The deferral modal scopes its round picker to the registration's course link (courseId, from the [>] Course field), but the participant's actual enrolment is the Round link. These two fields are maintained independently in Airtable and can disagree (though they shouldn't!). When they do, the website offers deferral rounds from the wrong course, and dropout.dropoutOrDeferral accepts them without checking, so a participant deferring "to a later date" gets silently moved to a different course.

Bug report from a real incidence of this.

🛝 Steps to reproduce

You can run this query to find users where these fields do mismatch:

SELECT cr.id, cr.email, cr.decision, cr."courseId" AS reg_course, ar."courseId" AS round_course FROM course_registration cr JOIN applications_round ar ON ar.id = cr."roundId" WHERE ar."courseId" IS NOT NULL AND cr."courseId" <> ar."courseId"

I've yet to work out how this can actually occur

✅ Definition of done

It is no longer possible to have mismatching course and round fields

📌 Notes / Designs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions