Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: preserve manual links for destinations without integrations

Tin088a8f1718dd
diff --git a/apps/api/src/project/controllers/move-project.ts b/apps/api/src/project/controllers/move-project.ts
index f89774c11..43d24b7a2 100644
--- a/apps/api/src/project/controllers/move-project.ts
+++ b/apps/api/src/project/controllers/move-project.ts
@@ -214,6 +214,7 @@ async function moveProject(
.from(taskTable)
.where(eq(taskTable.projectId, id)),
),
+ isNotNull(externalLinkTable.integrationId),
notInArray(
externalLinkTable.integrationId,
tx
diff --git a/apps/api/src/task/controllers/move-task.ts b/apps/api/src/task/controllers/move-task.ts
index 962887194..039c58d66 100644
--- a/apps/api/src/task/controllers/move-task.ts
+++ b/apps/api/src/task/controllers/move-task.ts
@@ -1,4 +1,4 @@
-import { and, asc, eq, notInArray } from "drizzle-orm";
+import { and, asc, eq, isNotNull, notInArray } from "drizzle-orm";
import { HTTPException } from "hono/http-exception";
import db from "../../database";
import {
@@ -167,6 +167,7 @@ async function moveTask({
.where(
and(
eq(externalLinkTable.taskId, taskId),
+ isNotNull(externalLinkTable.integrationId),
notInArray(
externalLinkTable.integrationId,
tx