fix: keep imported follow-ups out of current work
They stayed on the board when a non-prior deal was attached, even though the person was prior. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -287,17 +287,24 @@ export class BillingService {
|
||||
)
|
||||
)
|
||||
OR (
|
||||
a."dealId" IS NULL
|
||||
AND a."createdAt" < ${cutoff}
|
||||
a."createdAt" < ${cutoff}
|
||||
AND (
|
||||
EXISTS (
|
||||
SELECT 1 FROM "Person" AS p
|
||||
WHERE p."id" = a."personId" AND p."importSource" = 'didar'
|
||||
WHERE p."id" = a."personId"
|
||||
AND (
|
||||
p."importSource" = 'didar'
|
||||
OR p."previousImportSource" = 'didar'
|
||||
)
|
||||
)
|
||||
OR EXISTS (
|
||||
SELECT 1 FROM "Company" AS c
|
||||
WHERE c."id" = a."companyId" AND c."importSource" = 'didar'
|
||||
)
|
||||
OR EXISTS (
|
||||
SELECT 1 FROM "Deal" AS d2
|
||||
WHERE d2."id" = a."dealId" AND d2."importSource" = 'didar'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user