| | 1 | = UC0003 - RSVP or Announce Absence for Activity Session = |
| | 2 | |
| | 3 | '''Initiating actor:''' Member |
| | 4 | |
| | 5 | A Member views upcoming activity sessions, submits an RSVP, or announces an absence. The scenario uses Nikola Spasovski as the logged-in member. |
| | 6 | |
| | 7 | == Scenario == |
| | 8 | |
| | 9 | 1. The Member opens the list of upcoming activity sessions. |
| | 10 | |
| | 11 | 2. The application lists upcoming sessions with the member's current RSVP and attendance status. |
| | 12 | |
| | 13 | {{{#!sql |
| | 14 | SELECT |
| | 15 | a.at_name, |
| | 16 | a.as_start_time, |
| | 17 | a.as_location, |
| | 18 | COALESCE(p.rsvp_status, 'no_response') AS rsvp_status, |
| | 19 | p.rsvp_at, |
| | 20 | COALESCE(p.attendance_status, 'not_checked') AS attendance_status |
| | 21 | FROM activity_sessions a |
| | 22 | LEFT JOIN participation p |
| | 23 | ON p.at_name = a.at_name |
| | 24 | AND p.as_start_time = a.as_start_time |
| | 25 | AND p.as_location = a.as_location |
| | 26 | AND p.student_index = 230014 |
| | 27 | WHERE a.as_start_time >= CURRENT_TIMESTAMP |
| | 28 | ORDER BY a.as_start_time, a.at_name; |
| | 29 | }}} |
| | 30 | |
| | 31 | 3. The Member chooses the IT workshop and marks that they are going. |
| | 32 | |
| | 33 | 4. The application stores the RSVP. |
| | 34 | |
| | 35 | {{{#!sql |
| | 36 | INSERT INTO participation ( |
| | 37 | student_index, |
| | 38 | at_name, |
| | 39 | as_start_time, |
| | 40 | as_location, |
| | 41 | rsvp_status, |
| | 42 | rsvp_at, |
| | 43 | attendance_status |
| | 44 | ) |
| | 45 | VALUES ( |
| | 46 | 230014, |
| | 47 | 'IT Workshop', |
| | 48 | TIMESTAMP '2026-11-26 17:00:00', |
| | 49 | 'Base42', |
| | 50 | 'going', |
| | 51 | CURRENT_TIMESTAMP, |
| | 52 | 'not_checked' |
| | 53 | ); |
| | 54 | }}} |
| | 55 | |
| | 56 | 5. The Member enters an absence reason for the Hackathon core team meeting. |
| | 57 | |
| | 58 | 6. The application stores the absence announcement. |
| | 59 | |
| | 60 | {{{#!sql |
| | 61 | INSERT INTO announces_absence ( |
| | 62 | student_index, |
| | 63 | at_name, |
| | 64 | as_start_time, |
| | 65 | as_location, |
| | 66 | reason, |
| | 67 | announced_at |
| | 68 | ) |
| | 69 | VALUES ( |
| | 70 | 230014, |
| | 71 | 'Core Team Meeting', |
| | 72 | TIMESTAMP '2026-12-01 18:30:00', |
| | 73 | 'BEST Office', |
| | 74 | 'Faculty obligations at the same time.', |
| | 75 | CURRENT_TIMESTAMP |
| | 76 | ); |
| | 77 | }}} |
| | 78 | |
| | 79 | 7. The application updates the participation status for the same session. |
| | 80 | |
| | 81 | {{{#!sql |
| | 82 | UPDATE participation |
| | 83 | SET |
| | 84 | rsvp_status = 'not_going', |
| | 85 | rsvp_at = CURRENT_TIMESTAMP, |
| | 86 | attendance_status = 'excused' |
| | 87 | WHERE student_index = 230014 |
| | 88 | AND at_name = 'Core Team Meeting' |
| | 89 | AND as_start_time = TIMESTAMP '2026-12-01 18:30:00' |
| | 90 | AND as_location = 'BEST Office'; |
| | 91 | }}} |
| | 92 | |
| | 93 | 8. The application shows the saved absence and updated participation status. |
| | 94 | |
| | 95 | {{{#!sql |
| | 96 | SELECT |
| | 97 | p.student_index, |
| | 98 | p.at_name, |
| | 99 | p.as_start_time, |
| | 100 | p.as_location, |
| | 101 | p.rsvp_status, |
| | 102 | p.rsvp_at, |
| | 103 | p.attendance_status, |
| | 104 | aa.reason, |
| | 105 | aa.announced_at |
| | 106 | FROM participation p |
| | 107 | LEFT JOIN announces_absence aa |
| | 108 | ON aa.student_index = p.student_index |
| | 109 | AND aa.at_name = p.at_name |
| | 110 | AND aa.as_start_time = p.as_start_time |
| | 111 | AND aa.as_location = p.as_location |
| | 112 | WHERE p.student_index = 230014 |
| | 113 | AND p.at_name = 'Core Team Meeting' |
| | 114 | AND p.as_start_time = TIMESTAMP '2026-12-01 18:30:00' |
| | 115 | AND p.as_location = 'BEST Office'; |
| | 116 | }}} |