This is a concurrency problem, so I can think of two solutions for the time being.
-
Three-step process:
1. Share the student's application with the student's number 1 choice
2. If there are students without a mentor AND mentors without students: Share the application of the student with their second choice mentor, given that the mentors have slots.
3. Repeat step 2 for choice number three for the same conditions.
4. If there are still students without mentors and mentors without students, we can share those applications with the mentors without students.
-
Old method: We export the DB to a Google Sheet and do the previous filtering method where we personally do the pairing and send the mentors the final list.