-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
User Story
As an event organizer using the raffle application,
I want to be able to replace winners who are no longer at the event,
So that I can ensure prizes are awarded to attendees who are present.
Description
Currently, when a winner is drawn in the raffle, there is no way to handle the scenario where the winner has left the event before the prize can be awarded. We need a feature to:
- Mark a winner as "absent" directly from their winner card.
- Automatically draw a replacement winner when someone is marked as absent.
- Ensure that absent winners are excluded from future draws in all rounds.
- Visually distinguish between present winners and absent winners in the interface.
Acceptance Criteria
- Add an "Absent" button to each winner card.
- When the "Absent" button is clicked, mark the winner as absent and draw a new winner for that prize.
- Store absent winners in session state and exclude them from all future draws.
- Apply visual styling to indicate absent winners (e.g., grayed out or with a specific label).
- Include absent winner information in the CSV export, marked appropriately.
- Ensure the total count of winners remains accurate in the session information sidebar.
Technical Implementation Details
- Modify the winner card display to include an "Absent" button.
- Create a function to handle marking a winner as absent and redrawing.
- Add a new session state variable to track absent participants.
- Update the
draw_winnersfunction to exclude both previous winners and absent participants. - Modify the CSV export to include an "absent" status column.
Testing Scenarios
- Test replacing a winner in a single-winner round.
- Test replacing a winner in a multi-winner round.
- Verify absent winners do not appear in subsequent rounds.
- Test exporting results after marking winners as absent.
- Test edge cases (e.g., when all remaining participants are absent or have won).
Priority
Medium
Effort Estimate
Medium (4-6 hours)
Dependencies
None
Metadata
Metadata
Assignees
Labels
No labels