feat: queues have default team, tickets inherit it
- team_id on queues table (optional, can be overridden per-ticket) - Ticket creation auto-sets team_id from the queue's default - Queue admin form has team selector (scrip flow node 03) - Queue API (POST/PATCH) accepts team_id No enforcement — just a helpful default. Teams and queues are loosely coupled, not hierarchically locked. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ export function createQueuesRouter(db: Db): Hono {
|
||||
name: parsed.name,
|
||||
description: parsed.description ?? null,
|
||||
lifecycle_id: parsed.lifecycle_id ?? null,
|
||||
team_id: parsed.team_id ?? null,
|
||||
}).returning();
|
||||
|
||||
if (!queue) {
|
||||
@@ -48,6 +49,7 @@ export function createQueuesRouter(db: Db): Hono {
|
||||
if (body.name !== undefined) updateData.name = String(body.name);
|
||||
if (body.description !== undefined) updateData.description = body.description ? String(body.description) : null;
|
||||
if (body.lifecycle_id !== undefined) updateData.lifecycle_id = body.lifecycle_id || null;
|
||||
if (body.team_id !== undefined) updateData.team_id = body.team_id || null;
|
||||
|
||||
const [updated] = await db.update(queues)
|
||||
.set(updateData)
|
||||
|
||||
Reference in New Issue
Block a user