From 8e5eccfd8ea8954ed85ca1dc7d11a92e5a954c62 Mon Sep 17 00:00:00 2001 From: rever-tecnologia Date: Tue, 16 Dec 2025 16:38:38 -0300 Subject: [PATCH] debug: log resultado da funcao applyChecklistTemplateToItems --- convex/tickets.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/convex/tickets.ts b/convex/tickets.ts index 39ebe21..975bb1f 100644 --- a/convex/tickets.ts +++ b/convex/tickets.ts @@ -2815,6 +2815,16 @@ export const applyChecklistTemplate = mutation({ hasDescription: Boolean(template.description), }); const result = applyChecklistTemplateToItems(current, template, { now, actorId }); + // DEBUG: Verificar resultado com templateDescription + console.log("[DEBUG applyChecklistTemplate] Result:", { + added: result.added, + items: result.checklist.map(item => ({ + id: item.id, + text: item.text.substring(0, 20), + templateDescription: item.templateDescription, + hasTemplateDesc: Boolean(item.templateDescription), + })), + }); if (result.added === 0) { return { ok: true, added: 0 }; }