Skip to content

RM-45: Add predefined close reasons - #47

Merged
biast12 merged 1 commit into
masterfrom
RM-45
Oct 8, 2026
Merged

biast12 merged 1 commit into
masterfrom
RM-45

Conversation

@biast12

@biast12 biast12 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RM-45

Description

Adds the panel_close_reasons table: one row per panel with reasons (text[]) and allow_custom (bool, default true). New methods are Get, GetByTicket, GetAllForGuild and Set/SetWithTx. It also adds the Match/Resolve helpers that the worker and dashboard both use.

CREATE TABLE IF NOT EXISTS panel_close_reasons(
	"panel_id" int NOT NULL,
	"reasons" text[] NOT NULL DEFAULT '{}',
	"allow_custom" bool NOT NULL DEFAULT true,
	FOREIGN KEY("panel_id") REFERENCES panels("panel_id") ON DELETE CASCADE ON UPDATE CASCADE,
	PRIMARY KEY("panel_id")
);

For:
TicketsBot-cloud/worker#156
TicketsBot-cloud/dashboard#157

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Introduces panel close-reason storage with preset matching, custom-reason support, guild and ticket lookups, and transactional updates. Registers the new table with database initialization and schema creation.
@biast12
biast12 merged commit 3b63509 into master Oct 8, 2026
2 checks passed
@biast12
biast12 deleted the RM-45 branch October 8, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants