Skip to content

Restore the global ticket limit - #144

Merged
BenHall-1 merged 3 commits into
masterfrom
global-limit
Sep 12, 2026
Merged

BenHall-1 merged 3 commits into
masterfrom
global-limit

Conversation

@biast12

@biast12 biast12 commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Restore the global ticket limit with a slight rework.

The limits now work simultaneously instead of as an overwrite, so you can set a global limit, give a specific panel a lower one, and still have the global total apply everywhere. Before, a panel with its own limit ignored the global one completely, so its allowance stacked on top of the total.

A limit of 0 turns that check off, so a user is only unlimited when both are 0.
The default global limit is 10.

Example with a global limit of 6, panel A on 1, and panels B and C on 0:

A B+C Total Open in A (before) Open in A (now) Open in B/C (before) Open in B/C (now)
0 3 3 allowed allowed allowed allowed
1 3 4 blocked (panel) blocked (panel) allowed allowed
0 6 6 allowed blocked (server) blocked (server) blocked (server)
1 5 6 blocked (panel) blocked (panel) blocked (server) blocked (server)

REQUIRED: TicketsBot-cloud/database#43

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

Follow the example should be pretty good

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

Expose `ticket_limit` in the guild settings UI with a 0–10 number input and add the field to `GuildSettings` typing. On the backend, enforce the same upper bound in settings validation, fix the panel validation error text to match the actual max (10), and clarify that a panel ticket limit of `0` means no panel-specific limit. The local `database` module replace directive was also enabled in `go.mod`.
@biast12
biast12 requested a review from a team as a code owner September 8, 2026 18:59
@github-actions github-actions Bot added the type:feature New Feature label Sep 8, 2026
@github-actions github-actions Bot added the needs:bump_db PR references database repo changes label Sep 8, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 9, 2026 •

Copy link
Copy Markdown

Deploying tickets-v2-dashboard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4aae79a
Status: ✅  Deploy successful!
Preview URL: https://05533e1a.tickets-v2-dashboard.pages.dev
Branch Preview URL: https://global-limit.tickets-v2-dashboard.pages.dev

View logs

Updates the backend to newer TicketsBot common and database module versions and refreshes the transitive Go dependency checksums in go.mod and go.sum. This also disables the local database replace directive so the build uses the published module version, and bumps related x/* packages such as x/sync, x/net, x/sys, x/term, and x/text to compatible releases.
@biast12

biast12 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@BenHall-1 Bumped!!

@BenHall-1
BenHall-1 merged commit 71be7ea into master Sep 12, 2026
2 checks passed
@BenHall-1
BenHall-1 deleted the global-limit branch September 12, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:bump_db PR references database repo changes type:feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants