office-hours-help-queue
                                
                                 office-hours-help-queue copied to clipboard
                                
                                    office-hours-help-queue copied to clipboard
                            
                            
                            
                        Uploading new course groups while there are in-flight requests breaks queue with 'not found' error
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'.
ad-hoc fix with
mysql> update course_queue_entries set course_group_id = NULL where course_queue_id = 753 and resolved_at is null;
Query OK, 13 rows affected (0.05 sec)
Rows matched: 13  Changed: 13  Warnings: 0