Changes between Initial Version and Version 1 of UseCase0008


Ignore:
Timestamp:
08/29/26 19:08:45 (8 days ago)
Author:
236024
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase0008

    v1 v1  
     1= UC0008 - Volunteer for Event Session =
     2
     3'''Initiating actor:''' Member
     4
     5A Member volunteers for a selected event session. The scenario uses Dario Petreski volunteering for the Company Stands session at MFS during Job Fair 2026.
     6
     7== Scenario ==
     8
     91. The Member opens the volunteer opportunities for Job Fair 2026.
     10
     112. The application lists event sessions and volunteer coverage.
     12
     13{{{#!sql
     14SELECT
     15    es.est_name,
     16    es.es_start_time,
     17    es.location,
     18    es.es_title,
     19    est.needed_no_volunteers,
     20    COUNT(v.student_index) AS assigned_volunteers,
     21    GREATEST(est.needed_no_volunteers - COUNT(v.student_index), 0) AS missing_volunteers
     22FROM event_sessions es
     23JOIN event_session_types est
     24    ON est.est_name = es.est_name
     25LEFT JOIN volunteers v
     26    ON v.et_name = es.et_name
     27   AND v.event_title = es.event_title
     28   AND v.event_start_time = es.event_start_time
     29   AND v.est_name = es.est_name
     30   AND v.es_start_time = es.es_start_time
     31   AND v.location = es.location
     32WHERE es.et_name = 'Job Fair'
     33  AND es.event_title = 'Job Fair 2026'
     34  AND es.event_start_time = TIMESTAMP '2026-03-23 09:00:00'
     35GROUP BY
     36    es.est_name,
     37    es.es_start_time,
     38    es.location,
     39    es.es_title,
     40    est.needed_no_volunteers
     41ORDER BY es.es_start_time, es.location, es.est_name;
     42}}}
     43
     443. The Member chooses the Company Stands session at MFS.
     45
     464. The application checks whether the member already volunteers at the same start time.
     47
     48{{{#!sql
     49SELECT
     50    v.et_name,
     51    v.event_title,
     52    v.est_name,
     53    v.es_start_time,
     54    v.location,
     55    v.volunteer_role
     56FROM volunteers v
     57WHERE v.student_index = 230024
     58  AND v.es_start_time = TIMESTAMP '2026-03-24 10:00:00';
     59}}}
     60
     615. The application stores the volunteer record.
     62
     63{{{#!sql
     64INSERT INTO volunteers (
     65    student_index,
     66    et_name,
     67    event_title,
     68    event_start_time,
     69    est_name,
     70    es_start_time,
     71    location,
     72    volunteer_role
     73)
     74VALUES (
     75    230024,
     76    'Job Fair',
     77    'Job Fair 2026',
     78    TIMESTAMP '2026-03-23 09:00:00',
     79    'Company Stands',
     80    TIMESTAMP '2026-03-24 10:00:00',
     81    'MFS',
     82    'stand support'
     83);
     84}}}
     85
     866. The application refreshes the volunteer list for the selected session.
     87
     88{{{#!sql
     89SELECT
     90    v.student_index,
     91    s.first_name,
     92    s.last_name,
     93    v.volunteer_role
     94FROM volunteers v
     95JOIN students s
     96    ON s.student_index = v.student_index
     97WHERE v.et_name = 'Job Fair'
     98  AND v.event_title = 'Job Fair 2026'
     99  AND v.event_start_time = TIMESTAMP '2026-03-23 09:00:00'
     100  AND v.est_name = 'Company Stands'
     101  AND v.es_start_time = TIMESTAMP '2026-03-24 10:00:00'
     102  AND v.location = 'MFS'
     103ORDER BY s.last_name, s.first_name;
     104}}}