wiki:UseCase0003

Version 2 (modified by 236024, 4 days ago) ( diff )

--

UC0003 - RSVP or Announce Absence for Activity Session

Initiating actor: Member

A Member views upcoming activity sessions, submits an RSVP, or announces an absence. The scenario uses Nikola Spasovski as the logged-in member.

Scenario

  1. The Member opens the list of upcoming activity sessions.
  1. The application lists upcoming sessions with the member's current RSVP, attendance status, and whether attendance is expected.
SELECT
    a.as_id,
    at.at_name,
    a.as_start_time,
    l.l_name,
    p.rsvp_status,
    p.rsvp_at,
    p.attendance_status,
    CASE
        WHEN ra.student_index IS NOT NULL THEN 'yes'
        ELSE 'no'
    END AS attendance_expected
FROM activity_sessions a
JOIN activity_types at
    ON at.at_id = a.at_id
JOIN locations l
    ON l.l_id = a.l_id
LEFT JOIN participation p
    ON p.as_id = a.as_id
   AND p.student_index = 230014
LEFT JOIN required_attendance ra
    ON ra.as_id = a.as_id
   AND ra.student_index = 230014
WHERE a.as_start_time >= CURRENT_TIMESTAMP
ORDER BY a.as_start_time, at.at_name;
  1. The Member chooses the IT workshop and marks that they are going.
  1. The application stores the RSVP.
INSERT INTO participation (
    student_index,
    as_id,
    rsvp_status,
    rsvp_at
)
VALUES (
    230014,
    22,
    'going',
    CURRENT_TIMESTAMP
);
  1. The Member enters an absence reason for the Full Member Meeting on 16 April 2026.
  1. The application checks that the member's attendance is expected for the selected activity session.
SELECT
    student_index,
    as_id
FROM required_attendance
WHERE student_index = 230014
  AND as_id = 9;
  1. The application stores the absence announcement.
INSERT INTO announces_absence (
    student_index,
    as_id,
    reason,
    announced_at
)
VALUES (
    230014,
    9,
    'Faculty obligations at the same time.',
    CURRENT_TIMESTAMP
);
  1. The application stores that the member is not going to the same activity session.
INSERT INTO participation (
    student_index,
    as_id,
    rsvp_status,
    rsvp_at
)
VALUES (
    230014,
    9,
    'not_going',
    CURRENT_TIMESTAMP
);
  1. The application shows the saved absence and participation status.
SELECT
    p.student_index,
    at.at_name,
    a.as_start_time,
    l.l_name,
    p.rsvp_status,
    p.rsvp_at,
    p.attendance_status,
    aa.reason,
    aa.announced_at
FROM participation p
JOIN activity_sessions a
    ON a.as_id = p.as_id
JOIN activity_types at
    ON at.at_id = a.at_id
JOIN locations l
    ON l.l_id = a.l_id
LEFT JOIN announces_absence aa
    ON aa.student_index = p.student_index
   AND aa.as_id = p.as_id
WHERE p.student_index = 230014
  AND p.as_id = 9;
Note: See TracWiki for help on using the wiki.