Changes between Initial Version and Version 1 of UseCase0003


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

--

Legend:

Unmodified
Added
Removed
Modified
  • UseCase0003

    v1 v1  
     1= UC0003 - RSVP or Announce Absence for Activity Session =
     2
     3'''Initiating actor:''' Member
     4
     5A 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
     91. The Member opens the list of upcoming activity sessions.
     10
     112. The application lists upcoming sessions with the member's current RSVP and attendance status.
     12
     13{{{#!sql
     14SELECT
     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
     21FROM activity_sessions a
     22LEFT 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
     27WHERE a.as_start_time >= CURRENT_TIMESTAMP
     28ORDER BY a.as_start_time, a.at_name;
     29}}}
     30
     313. The Member chooses the IT workshop and marks that they are going.
     32
     334. The application stores the RSVP.
     34
     35{{{#!sql
     36INSERT 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)
     45VALUES (
     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
     565. The Member enters an absence reason for the Hackathon core team meeting.
     57
     586. The application stores the absence announcement.
     59
     60{{{#!sql
     61INSERT INTO announces_absence (
     62    student_index,
     63    at_name,
     64    as_start_time,
     65    as_location,
     66    reason,
     67    announced_at
     68)
     69VALUES (
     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
     797. The application updates the participation status for the same session.
     80
     81{{{#!sql
     82UPDATE participation
     83SET
     84    rsvp_status = 'not_going',
     85    rsvp_at = CURRENT_TIMESTAMP,
     86    attendance_status = 'excused'
     87WHERE 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
     938. The application shows the saved absence and updated participation status.
     94
     95{{{#!sql
     96SELECT
     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
     106FROM participation p
     107LEFT 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
     112WHERE 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}}}