Skip to content

feat: add ticket snooze/schedule#7

Merged
mpge merged 2 commits into
mainfrom
feat/ticket-snooze
Apr 8, 2026
Merged

feat: add ticket snooze/schedule#7
mpge merged 2 commits into
mainfrom
feat/ticket-snooze

Conversation

@mpge

@mpge mpge commented Apr 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add TicketSnoozeService with snooze_ticket() and unsnooze_ticket() methods
  • New ticket_meta table stores snoozed_until, snoozed_by, and status_before_snooze
  • WP-Cron event (escalated_check_snoozed_tickets) runs every minute to auto-wake expired snoozes
  • REST API endpoints: POST /tickets/{id}/snooze and POST /tickets/{id}/unsnooze
  • Activity logging for both snooze and unsnooze events
  • Static helper get_snoozed_ticket_ids() for excluding snoozed tickets from default queries

Test plan

  • Verify snooze changes ticket status to 'snoozed' and stores metadata
  • Verify unsnooze restores the previous status and clears metadata
  • Verify double-snooze and past-time snooze throw exceptions
  • Verify cron wake logic unsnoozes expired tickets but not future ones
  • Verify activity logging on both snooze and unsnooze
  • Verify get_snoozed_ticket_ids() returns correct IDs

mpge added 2 commits April 8, 2026 08:55
Add TicketSnoozeService with snooze_ticket() and unsnooze_ticket() methods
that store snooze metadata in a new ticket_meta table, change ticket status
to 'snoozed', and restore the previous status on wake. Includes WP-Cron
job (every minute) to auto-wake expired snoozes, REST API endpoints for
snooze/unsnooze, and comprehensive PHPUnit tests.
Merge main branch, resolve API bootstrap conflict to include both
snooze and split controllers. Fix get_snoozed_ticket_ids to use
wpdb->esc_like() for the SHOW TABLES LIKE check. Apply Pint fixes.
@mpge
mpge merged commit 3f713e6 into main Apr 8, 2026
1 of 3 checks passed
@mpge
mpge deleted the feat/ticket-snooze branch April 8, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant