Skip to content

Restore the global ticket limit - #151

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

Refactors ticket limit checks to evaluate panel and guild limits independently in both open and reopen flows, and reuses a shared reply/helper path when limits are reached. Updates user stats and welcome-message substitutions to show effective limits (including unlimited) instead of hardcoded defaults, and enables the local database module replace 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 needs:gomod_comment go.mod has uncommented local replace directives type:feature New Feature labels Sep 8, 2026
@github-actions github-actions Bot added the needs:bump_db PR references database repo changes label Sep 8, 2026
Refresh the worker module for the current dependency set: upgrade the Go toolchain to 1.26, update TicketsBot-cloud/common and database to newer revisions, and bump the transitive x/* library versions in go.mod/go.sum. This also comments out the local database replace directive so the module resolves against the published dependency instead of the local path.
@github-actions github-actions Bot removed the needs:gomod_comment go.mod has uncommented local replace directives label Sep 9, 2026
@biast12

biast12 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

@BenHall-1 Bumped!!

@BenHall-1
BenHall-1 merged commit d31e933 into master Sep 12, 2026
1 check 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