Skip to content

RM-45: Add predefined close reasons - #157

Open
biast12 wants to merge 3 commits into
masterfrom
RM-45
Open

biast12 wants to merge 3 commits into
masterfrom
RM-45

Conversation

@biast12

@biast12 biast12 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

RM-45

Description

  • Panel editor, Closing & Claiming: a Close Reasons list (up to 25 reasons, 100 characters each, reorderable, limits comes from select strings) and an Allow Custom Close Reasons toggle (on by default).
  • Where the picker appears: close, close request, bulk close, bulk close request, and Transcripts → Edit Close Reason. It shows when the ticket's panel has close reasons, with a custom text option when the panel allows it.
  • The API enforces the same rule. A reason that isn't one of the panel's close reasons, on a panel that doesn't allow custom reasons, returns 400. Bulk actions skip those tickets and report why.
  • Matching is case-insensitive, and the close reason's own text is what gets stored.
  • Panels without close reasons: the UI and requests are unchanged.
  • API responses:
    • GET /panels, GET /panels/:id and GET /tickets/:id now include close_reasons.
    • The transcripts list now includes panel_id.

Requires:
TicketsBot-cloud/database#47
TicketsBot-cloud/locale#252

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Adds panel-level predefined close reasons with custom-reason controls, validation, persistence, and management UI. Enforces configured reasons across ticket closing, close requests, bulk actions, and transcript editing while exposing them through panel and ticket APIs.
@BenHall-1

Copy link
Copy Markdown
Member

Ready to bump

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying tickets-v2-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1874256
Status: ✅  Deploy successful!
Preview URL: https://48a97d0f.tickets-v2-dashboard.pages.dev
Branch Preview URL: https://rm-45.tickets-v2-dashboard.pages.dev

View logs

@biast12

biast12 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@BenHall-1 bumped!

This branch has not been deployed

No deployments
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