timers should not be used on issues with multiple assignees

This commit is contained in:
Oliver Bryan
2026-01-20 23:13:12 +00:00
parent 6a91b4b9f3
commit 42a537a967
6 changed files with 53 additions and 10 deletions

View File

@@ -182,3 +182,11 @@ export async function getIssuesWithUsersByProject(projectId: number): Promise<Is
Assignees: assigneesByIssue.get(row.Issue.id) || [],
}));
}
export async function getIssueAssigneeCount(issueId: number): Promise<number> {
const [result] = await db
.select({ count: sql<number>`COUNT(*)` })
.from(IssueAssignee)
.where(eq(IssueAssignee.issueId, issueId));
return result?.count ?? 0;
}