= UC0008 - Volunteer for Event Session = '''Initiating actor:''' Member A Member volunteers for a selected event session. The scenario uses Dario Petreski volunteering for the Company Stands session at MFS during Job Fair 2026. == Scenario == 1. The Member opens the volunteer opportunities for Job Fair 2026. 2. The application lists event sessions and volunteer coverage. {{{#!sql SELECT es.est_name, es.es_start_time, es.location, es.es_title, est.needed_no_volunteers, COUNT(v.student_index) AS assigned_volunteers, GREATEST(est.needed_no_volunteers - COUNT(v.student_index), 0) AS missing_volunteers FROM event_sessions es JOIN event_session_types est ON est.est_name = es.est_name LEFT JOIN volunteers v ON v.et_name = es.et_name AND v.event_title = es.event_title AND v.event_start_time = es.event_start_time AND v.est_name = es.est_name AND v.es_start_time = es.es_start_time AND v.location = es.location WHERE es.et_name = 'Job Fair' AND es.event_title = 'Job Fair 2026' AND es.event_start_time = TIMESTAMP '2026-03-23 09:00:00' GROUP BY es.est_name, es.es_start_time, es.location, es.es_title, est.needed_no_volunteers ORDER BY es.es_start_time, es.location, es.est_name; }}} 3. The Member chooses the Company Stands session at MFS. 4. The application checks whether the member already volunteers at the same start time. {{{#!sql SELECT v.et_name, v.event_title, v.est_name, v.es_start_time, v.location, v.volunteer_role FROM volunteers v WHERE v.student_index = 230024 AND v.es_start_time = TIMESTAMP '2026-03-24 10:00:00'; }}} 5. The application stores the volunteer record. {{{#!sql INSERT INTO volunteers ( student_index, et_name, event_title, event_start_time, est_name, es_start_time, location, volunteer_role ) VALUES ( 230024, 'Job Fair', 'Job Fair 2026', TIMESTAMP '2026-03-23 09:00:00', 'Company Stands', TIMESTAMP '2026-03-24 10:00:00', 'MFS', 'stand support' ); }}} 6. The application refreshes the volunteer list for the selected session. {{{#!sql SELECT v.student_index, s.first_name, s.last_name, v.volunteer_role FROM volunteers v JOIN students s ON s.student_index = v.student_index WHERE v.et_name = 'Job Fair' AND v.event_title = 'Job Fair 2026' AND v.event_start_time = TIMESTAMP '2026-03-23 09:00:00' AND v.est_name = 'Company Stands' AND v.es_start_time = TIMESTAMP '2026-03-24 10:00:00' AND v.location = 'MFS' ORDER BY s.last_name, s.first_name; }}}