Skip to content

Update Support System to Use Database for Ticket Workflows #573

@DaRealFrost

Description

@DaRealFrost

Overview

Update the support/ticket system in the discord bot to utilize the database for ticket management, with improved workflows for creation, command handling, SLA notifications, and ticket lifecycle management. Below are high-level workflows and requirements:

Creation Workflow

  • On ticket creation: Create ticket in database with relevant metadata and no priority
  • Create Discord channel for the ticket
  • Restrict staff from sending messages in the channel until a priority is set (delete any messages from staff before priority assignment)

Command Workflows

  • ticket_type command: Update ticket type metadata in the database and reflect changes in the channel
  • priority command: Update priority metadata in database and channel; SLA countdown starts from first use of this command
  • close_ticket command: Update database as needed, delete the ticket channel, send transcript to appropriate locations (BOT_SUPPORT_TICKETS_TRANSCRIPTS_CHANNEL_ID and ticket owner direct messages with feedback request), and update transcript message in the BOT_SUPPORT_TICKETS_TRANSCRIPTS_CHANNEL_ID with the feedback if requested (by default request feedback)

SLA Notification Workflows

  • If support staff (with the relevant ticket role (bot_database_support_staff_role_id, bot_other_support_staff_role_id , bot_product_issues_support_staff_role_id, bot_product_purchases_support_staff_role_id, bot_partnership_requests_support_staff_role_id)) do not respond within SLA (account for ticket type changes): Ping relevant ticket role every 24 hours in the ticket channel
  • If support staff do not respond within half the SLA time after ticket owner sends a message: Ping relevant ticket role every 24 hours in the SLA notification channel (BOT_SUPPORT_TICKETS_SLA_NOTIFICATIONS_CHANNEL_ID)
  • If ticket owner does not respond within 24 hours after a staff message: Ping ticket owner every 24 hours in the ticket channel as a reminder
  • If ticket owner’s last message is over 7 days old (and a staff response has come after that): Auto-close the ticket as timed out, with no feedback requested

Other Workflows

  • On bot startup: Check all open tickets in the database; if the associated Discord channel doesn’t exist, delete the ticket record

Please implement these workflows and update any necessary documentation/configuration. Test as you go and make sure docker builds fine without making any changes to it, and that all linting passes.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions