mirror of
https://github.com/hex248/sprint.git
synced 2026-02-09 02:33:02 +00:00
timers should not be used on issues with multiple assignees
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user