The /promotequick action raises an exception on the backend for some issues. See the Sentry report. (Also, the error message displayed in the UI is quite misleading, but that is being addressed under #21307).
Steps to reproduce
Find an issue with an associated ResourceMilestoneEvent which has no associated milestone
Submit a comment of /promote
Encounter this error message: "Your comment could not be submitted! Please check your network connection and try again."
What is the current bug behavior?
Using /promote in certain issues does not promote the issue, but does cause an error message to be displayed.
What is the expected correct behavior?
Using `/promote in these issues causes them to be promoted regardless of the milestone assignment.
@djensen do you have any more context? I just followed the steps to reproduce and promoted this issue to an epic -- then closed the epic and re-opened this issue.
@pd-gitlab@johnhope I'm not sure if we need to re-open this, or create a fresh issue, but we're running into this same error message again. trycatch.js:215 POST https://gitlab.com/gitlab-org/gitlab/notes?target_id=36158140&target_type=issue 500
Seems like it started happening again two days ago and is caused by a foreign key constraint on the issue_id field when creating a resource_weight_event after promoting an issue. My guess would be that the issue is destroyed in the transaction before the resource_weight_event is saved, leading it to try to reference an issue that doesn't exist.
If it's happening for this issue it should be happening for all issues. If that's the case I'd consider reopening this and retaining the priority1 designation. WDYT?