diff --git a/app/api/leantime/status-labels/route.ts b/app/api/leantime/status-labels/route.ts index aa3c51de..6e1fb888 100644 --- a/app/api/leantime/status-labels/route.ts +++ b/app/api/leantime/status-labels/route.ts @@ -190,21 +190,23 @@ export async function GET(request: NextRequest) { let statusType; let statusClass; - switch (task.status.toLowerCase()) { - case 'new': + // Convert numeric status to string and handle accordingly + const statusStr = task.status.toString(); + switch (statusStr) { + case '1': statusType = 'NEW'; statusClass = 'bg-blue-100 text-blue-800'; break; - case 'in_progress': + case '2': statusType = 'INPROGRESS'; statusClass = 'bg-yellow-100 text-yellow-800'; break; - case 'done': + case '3': statusType = 'DONE'; statusClass = 'bg-green-100 text-green-800'; break; default: - statusType = 'NONE'; + statusType = 'UNKNOWN'; statusClass = 'bg-gray-100 text-gray-800'; }