mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
introduced sprint selection to the create issue dialog
This commit is contained in:
@@ -7,6 +7,7 @@ export async function createIssue(
|
||||
title: string,
|
||||
description: string,
|
||||
creatorId: number,
|
||||
sprintId?: number,
|
||||
assigneeId?: number,
|
||||
status?: string,
|
||||
) {
|
||||
@@ -30,6 +31,7 @@ export async function createIssue(
|
||||
description,
|
||||
number: nextNumber,
|
||||
creatorId,
|
||||
sprintId,
|
||||
assigneeId,
|
||||
...(status && { status }),
|
||||
})
|
||||
|
||||
@@ -23,11 +23,13 @@ export default async function issueCreate(req: AuthedRequest) {
|
||||
|
||||
const title = url.searchParams.get("title") || "Untitled Issue";
|
||||
const description = url.searchParams.get("description") || "";
|
||||
const sprintIdParam = url.searchParams.get("sprintId");
|
||||
const sprintId = sprintIdParam ? Number(sprintIdParam) : undefined;
|
||||
const assigneeIdParam = url.searchParams.get("assigneeId");
|
||||
const assigneeId = assigneeIdParam ? Number(assigneeIdParam) : undefined;
|
||||
const status = url.searchParams.get("status") || undefined;
|
||||
|
||||
const issue = await createIssue(project.id, title, description, req.userId, assigneeId, status);
|
||||
const issue = await createIssue(project.id, title, description, req.userId, sprintId, assigneeId, status);
|
||||
|
||||
return Response.json(issue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user