mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
fix: address greptile feedback for blocker dependencies
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
467f3a749a
commit
4c01a45d2a
5 changed files with 14 additions and 2 deletions
|
|
@ -819,6 +819,13 @@ export function issueService(db: Db) {
|
|||
}
|
||||
|
||||
if (deduped.length > 0) {
|
||||
const lockedIssueIds = [issueId, ...deduped].sort();
|
||||
await dbOrTx.execute(
|
||||
sql`SELECT ${issues.id} FROM ${issues}
|
||||
WHERE ${and(eq(issues.companyId, companyId), inArray(issues.id, lockedIssueIds))}
|
||||
ORDER BY ${issues.id}
|
||||
FOR UPDATE`,
|
||||
);
|
||||
const relatedIssues = await dbOrTx
|
||||
.select({ id: issues.id })
|
||||
.from(issues)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue