Changes between Version 1 and Version 2 of UseCase0003
- Timestamp:
- 09/02/26 20:38:05 (4 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UseCase0003
v1 v2 9 9 1. The Member opens the list of upcoming activity sessions. 10 10 11 2. The application lists upcoming sessions with the member's current RSVP and attendance status.11 2. The application lists upcoming sessions with the member's current RSVP, attendance status, and whether attendance is expected. 12 12 13 13 {{{#!sql 14 14 SELECT 15 a.at_name, 15 a.as_id, 16 at.at_name, 16 17 a.as_start_time, 17 a.as_location,18 COALESCE(p.rsvp_status, 'no_response') ASrsvp_status,18 l.l_name, 19 p.rsvp_status, 19 20 p.rsvp_at, 20 COALESCE(p.attendance_status, 'not_checked') AS attendance_status 21 p.attendance_status, 22 CASE 23 WHEN ra.student_index IS NOT NULL THEN 'yes' 24 ELSE 'no' 25 END AS attendance_expected 21 26 FROM activity_sessions a 27 JOIN activity_types at 28 ON at.at_id = a.at_id 29 JOIN locations l 30 ON l.l_id = a.l_id 22 31 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 32 ON p.as_id = a.as_id 26 33 AND p.student_index = 230014 34 LEFT JOIN required_attendance ra 35 ON ra.as_id = a.as_id 36 AND ra.student_index = 230014 27 37 WHERE a.as_start_time >= CURRENT_TIMESTAMP 28 ORDER BY a.as_start_time, a .at_name;38 ORDER BY a.as_start_time, at.at_name; 29 39 }}} 30 40 … … 36 46 INSERT INTO participation ( 37 47 student_index, 38 at_name, 39 as_start_time, 40 as_location, 48 as_id, 41 49 rsvp_status, 42 rsvp_at, 43 attendance_status 50 rsvp_at 44 51 ) 45 52 VALUES ( 46 53 230014, 47 'IT Workshop', 48 TIMESTAMP '2026-11-26 17:00:00', 49 'Base42', 54 22, 50 55 'going', 51 CURRENT_TIMESTAMP, 52 'not_checked' 56 CURRENT_TIMESTAMP 53 57 ); 54 58 }}} 55 59 56 5. The Member enters an absence reason for the Hackathon core team meeting.60 5. The Member enters an absence reason for the Full Member Meeting on 16 April 2026. 57 61 58 6. The application stores the absence announcement. 62 6. The application checks that the member's attendance is expected for the selected activity session. 63 64 {{{#!sql 65 SELECT 66 student_index, 67 as_id 68 FROM required_attendance 69 WHERE student_index = 230014 70 AND as_id = 9; 71 }}} 72 73 7. The application stores the absence announcement. 59 74 60 75 {{{#!sql 61 76 INSERT INTO announces_absence ( 62 77 student_index, 63 at_name, 64 as_start_time, 65 as_location, 78 as_id, 66 79 reason, 67 80 announced_at … … 69 82 VALUES ( 70 83 230014, 71 'Core Team Meeting', 72 TIMESTAMP '2026-12-01 18:30:00', 73 'BEST Office', 84 9, 74 85 'Faculty obligations at the same time.', 75 86 CURRENT_TIMESTAMP … … 77 88 }}} 78 89 79 7. The application updates the participation status for the samesession.90 8. The application stores that the member is not going to the same activity session. 80 91 81 92 {{{#!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'; 93 INSERT INTO participation ( 94 student_index, 95 as_id, 96 rsvp_status, 97 rsvp_at 98 ) 99 VALUES ( 100 230014, 101 9, 102 'not_going', 103 CURRENT_TIMESTAMP 104 ); 91 105 }}} 92 106 93 8. The application shows the saved absence and updated participation status.107 9. The application shows the saved absence and participation status. 94 108 95 109 {{{#!sql 96 110 SELECT 97 111 p.student_index, 98 p.at_name,99 p.as_start_time,100 p.as_location,112 at.at_name, 113 a.as_start_time, 114 l.l_name, 101 115 p.rsvp_status, 102 116 p.rsvp_at, … … 105 119 aa.announced_at 106 120 FROM participation p 121 JOIN activity_sessions a 122 ON a.as_id = p.as_id 123 JOIN activity_types at 124 ON at.at_id = a.at_id 125 JOIN locations l 126 ON l.l_id = a.l_id 107 127 LEFT JOIN announces_absence aa 108 128 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 129 AND aa.as_id = p.as_id 112 130 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'; 131 AND p.as_id = 9; 116 132 }}}
