← back to Ticket Action Viewer
viewer: Take now stamps start date+time into the ticket log (TK-10374)
292eb4260715ea7bae29dfbbbe355a3b17ebeab1 · 2026-08-10 07:48:10 -0700 · Steve Abrams
Files touched
Diff
commit 292eb4260715ea7bae29dfbbbe355a3b17ebeab1
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Aug 10 07:48:10 2026 -0700
viewer: Take now stamps start date+time into the ticket log (TK-10374)
---
server.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index 5e52095..935cd5b 100644
--- a/server.js
+++ b/server.js
@@ -73,9 +73,16 @@ const server = http.createServer(async (req, res) => {
if (u.pathname === '/api/action' && req.method === 'POST') {
let p; try { p = JSON.parse(await body(req)); } catch { return json(res, 400, { ok: false, out: 'bad json' }); }
const { id, action, text } = p;
+ // TAKE = assign to me AND stamp the start date+time into the ticket log.
+ if (action === 'take') {
+ const r1 = await tk(['take', id]);
+ const when = new Date().toLocaleString('en-US', { timeZone: 'America/Los_Angeles',
+ year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' });
+ const r2 = await tk(['log', id, `▶ STARTED ${when} PT — taken by ${AGENT} via Ticket Action Viewer`]);
+ return json(res, 200, { ok: r1.ok && r2.ok, out: r1.out + '\n' + r2.out, started: when });
+ }
let args;
- if (action === 'take') args = ['take', id];
- else if (action === 'done') args = ['done', id];
+ if (action === 'done') args = ['done', id];
else if (action === 'block') args = ['status', id, 'blocked'];
else if (action === 'log') args = ['log', id, text || ''];
else return json(res, 400, { ok: false, out: 'unknown action' });
← bec41b1 Ticket Action Viewer — ranked board with next-steps, gated-n
·
back to Ticket Action Viewer
·
viewer: add RUN NOW — opens a new iTerm2 window with a Claud dccd5ab →