[object Object]

← back to Ticket System

ticket IDs: new tickets start at TK-10000 (floor); legacy + existing ids unchanged/resolvable

f159cc1e0b062633185bc0632a90c0b0a5053a2b · 2026-07-27 19:08:52 -0700 · Steve Abrams

Files touched

Diff

commit f159cc1e0b062633185bc0632a90c0b0a5053a2b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Jul 27 19:08:52 2026 -0700

    ticket IDs: new tickets start at TK-10000 (floor); legacy + existing ids unchanged/resolvable
---
 lib.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib.js b/lib.js
index d6ce20e..c0622c7 100644
--- a/lib.js
+++ b/lib.js
@@ -146,9 +146,10 @@ function slugify(title) {
 }
 function idNum(id) { return parseInt(String(id).replace(/^TK-/i, ''), 10); } // parseInt stops at the slug dash
 function nextId(title) {
+  const FLOOR = 10000; // new tickets start at TK-10000 (Steve, 2026-07-27)
   let max = 0;
   for (const ev of readEvents()) if (ev.type === 'create') { const n = idNum(ev.id); if (n > max) max = n; }
-  const num = String(max + 1).padStart(5, '0');
+  const num = String(Math.max(max + 1, FLOOR)).padStart(5, '0');
   const slug = slugify(title);
   return 'TK-' + num + (slug ? '-' + slug : '');
 }

← 9136e0b live gdrive ticket export: hourly CSV sync to private Drive  ·  back to Ticket System  ·  auto-save: 2026-07-27T19:54:12 (2 files) — reaper-launchd.er 88546c2 →