If this is done mid-semester with active requests, since we denormalize course_group_id onto the request at submit time, any existing course group IDs become invalid. We're not using foreign keys in our schema (I'm not sure why) so this ends up propagating up to a runtime error when we try to resolve groups for open requests: Couldn't find CourseGroup with 'id'.
When new course groups are uploaded, we wipe out any existing groups and create all new ones:
https://github.com/mterwill/office-hours-help-queue/blob/c4eb3ca54da746ded55ee8cd5c83e6aa21815eb1/app/controllers/admin/courses_controller.rb#L58-L84
If this is done mid-semester with active requests, since we denormalize course_group_id onto the request at submit time, any existing course group IDs become invalid. We're not using foreign keys in our schema (I'm not sure why) so this ends up propagating up to a runtime error when we try to resolve groups for open requests:
Couldn't find CourseGroup with 'id'
.