Skip to content

/new with invalid references value causes unexpected error #540

@eartharoid

Description

@eartharoid

because this line doesn't check if the referenced ticket exists

if (referencesTicketId) data.referencesTicket = { connect: { id: referencesTicketId } };

which happens earlier but is out of scope

const ticket = await this.client.prisma.ticket.findUnique({ where: { id: referencesTicketId } });
if (ticket) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions