Require Actual Attendees field for closing WordCamps#1605
Require Actual Attendees field for closing WordCamps#1605Copilot wants to merge 15 commits intoproductionfrom
Conversation
…nd Date check Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
…9:59, remove unnecessary rtrim Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
There was a problem hiding this comment.
@copilot Can this be merged with require_complete_meta_to_publish_wordcamp at all?
There was a problem hiding this comment.
Yes, I've refactored the code to consolidate the validation logic. The require_complete_meta_to_close_wordcamp() method has been merged into require_complete_meta_to_publish_wordcamp(), which now handles all three status transitions (needs-site, scheduled, and closed).
Changes in commit a8c0372:
- Extracted shared validation logic into
validate_required_fields_for_status()helper method - Created specialized
validate_closed_status()method for closed status with End Date validation - All validation now runs through a single filter hook at priority 11
- Reduces code duplication while maintaining all existing functionality
|
@copilot I believe the |
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
…il event ends, add CampTix stats Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Done in commit 54525af:
The field automatically becomes editable once the event concludes (after 23:59:59 on the End Date). If no End Date is set, the Start Date is used as fallback. |
|
@copilot We can remove the 'End Date checks' we no longer need to validate the end-date has passed. The 'Actual Attendees' field should also be marked as required when editable. |
…itable, update field messages Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Done in commit 961c6e8:
The field is dynamically marked as required based on its protection status, and the message clearly indicates when it can be edited. |
Co-authored-by: dd32 <767313+dd32@users.noreply.github.com>
Tests the new validate_closed_status logic including: - Closing blocked when Actual Attendees is missing - Closing allowed when Actual Attendees is provided - Already-closed WordCamps can be resaved without re-validation - Actual Attendees field protected before event end date - Actual Attendees field editable after event end date - Start date used as fallback when no end date set - Missing fields stored in transient for error display Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create posts with draft status and update via $wpdb to avoid triggering WordCamp-specific hooks (Slack notifications) that fail without full environment setup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove double empty line in meta keys definition - Remove trailing whitespace on blank lines - Add full-stop punctuation to inline comments - Add phpcs:ignore for global $post override in tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WordCamps can now only transition to
wcpt-closedstatus when the "Actual Attendees" field is populated. This ensures critical attendance data is collected before events are archived.Implementation
Validation method: Consolidated into
require_complete_meta_to_publish_wordcamp()which now handles all status validationswcpt-closedwhen required fields are emptyCode structure: Refactored to reduce duplication
validate_required_fields_for_status()helper methodvalidate_closed_status()for closed status validationRequired fields: Extended
get_required_fields()with 'closed' caseError messaging: Admin notice Merge blocks repo into WordCamp #5 displays specific validation errors
UI improvements for Actual Attendees field:
Compatibility
require_complete_meta_to_publish_wordcamp()Screenshots
(Manual testing requires Docker environment setup - screenshots to be added during review)
How to test the changes in this Pull Request:
wcpt-scheduled(End Date can be in the past or future)wcpt-closed, then savewcpt-closedOriginal prompt
💡 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.