website
website copied to clipboard
Add cancellation reason field for student registrations
This PR implements the ability for parents and administrators to record reasons when students cancel or don't show up for classes.
Changes Made
Database Schema
- Added
cancellation_reasonTextField to theOrdermodel - Created migration
0041_order_cancellation_reason.py - Field is optional (blank=True, null=True) with helpful description
Admin Interface Enhancements
- Added "Has Reason" boolean indicator column in Order list view
- Made
cancellation_reasonfield editable in the admin form - Enhanced Order admin to show when cancellation reasons are provided
Session Check-in Template Updates
- Added "Reason" column to both "No Shows" and "Cancelled Tickets" tables
- Displays cancellation reason text or "No reason given" if empty
- Added CSS styling for proper column width and readability
- Truncates long reasons to maintain table layout
Benefits
This feature helps administrators and staff:
- Track patterns in student cancellations and no-shows
- Better understand reasons for absences (illness, scheduling conflicts, etc.)
- Improve communication with families about class participation
- Make data-driven decisions about session planning and policies
Backward Compatibility
The implementation is fully backward compatible:
- Existing orders without reasons display "No reason given"
- All new functionality is optional
- No breaking changes to existing workflows
Example Usage
When viewing the session check-in dashboard, staff will now see:
- "Student had flu symptoms" - helps track health-related absences
- "Conflicting soccer practice schedule" - identifies scheduling issues
- "No reason given" - for orders without specified reasons
The feature provides valuable insights while maintaining a clean, intuitive interface.
Fixes #930.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.