{"record":{"id":"977d3cc39140c866","repo":"multica-ai/multica","slug":"cannot-reorder-issue-s-relative-to-itself","errorCode":null,"errorMessage":"cannot reorder issue %s relative to itself","messagePattern":"cannot reorder issue (.+?) relative to itself","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1590,"sourceCode":"\t\treturn fmt.Errorf(\"issue %s has no status, cannot determine its column\", issueRef.Display)\n\t}\n\n\t// Resolve the relative target up front, before any no-op shortcut, so a bad\n\t// --before/--after value (typo, self-reference) always errors instead of\n\t// being swallowed by the single-issue-column fast path below.\n\trelative := before != \"\" || after != \"\"\n\tvar otherRef resolvedID\n\tif relative {\n\t\totherInput := before\n\t\tif after != \"\" {\n\t\t\totherInput = after\n\t\t}\n\t\totherRef, err = resolveIssueRef(ctx, client, otherInput)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"resolve target issue: %w\", err)\n\t\t}\n\t\tif otherRef.ID == issueRef.ID {\n\t\t\treturn fmt.Errorf(\"cannot reorder issue %s relative to itself\", issueRef.Display)\n\t\t}\n\t}\n\n\t// Scope the column to the issue's own project (when it has one) so the\n\t// computed position lands relative to the project board the issue lives on,\n\t// not a blend of every project's issues in this status.\n\tprojectID := strVal(target, \"project_id\")\n\tcolumn, err := fetchIssueColumn(ctx, client, wsID, projectID, status)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"list %s column: %w\", status, err)\n\t}\n\n\t// Build the column order with the target removed, plus a lookup of every\n\t// position in the column (the target's own included, for the no-op check).\n\tpositions := make(map[string]float64, len(column))\n\tordered := make([]string, 0, len(column))\n\tfor _, raw := range column {\n\t\tid := strVal(raw, \"id\")","sourceCodeStart":1572,"sourceCodeEnd":1608,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1572-L1608","documentation":"Error \"cannot reorder issue %s relative to itself\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:1590 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pick a different target issue; an issue cannot be reordered relative to itself."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}