{"record":{"id":"a287211939adb4a3","repo":"multica-ai/multica","slug":"reorder-issue-w","errorCode":null,"errorMessage":"reorder issue: %w","messagePattern":"reorder issue: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1660,"sourceCode":"\t\t\tinsertIdx = idx + 1\n\t\t}\n\t}\n\n\treordered := make([]string, 0, len(ordered)+1)\n\treordered = append(reordered, ordered[:insertIdx]...)\n\treordered = append(reordered, issueRef.ID)\n\treordered = append(reordered, ordered[insertIdx:]...)\n\n\tcurrentPos := positions[issueRef.ID]\n\tnewPos := computeReorderPosition(reordered, issueRef.ID, positions, currentPos)\n\tif newPos == currentPos {\n\t\tfmt.Fprintf(os.Stderr, \"Issue %s is already in that position.\\n\", issueRef.Display)\n\t\treturn issueReorderOutput(cmd, target)\n\t}\n\n\tvar result map[string]any\n\tif err := client.PutJSON(ctx, \"/api/issues/\"+url.PathEscape(issueRef.ID), map[string]any{\"position\": newPos}, &result); err != nil {\n\t\treturn fmt.Errorf(\"reorder issue: %w\", err)\n\t}\n\tfmt.Fprintf(os.Stderr, \"Issue %s reordered.\\n\", issueDisplayKey(result))\n\treturn issueReorderOutput(cmd, result)\n}\n\n// issueReorderOutput prints an issue map as a table or JSON, matching the\n// update command's output contract.\nfunc issueReorderOutput(cmd *cobra.Command, issue map[string]any) error {\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"table\" {\n\t\theaders := []string{\"KEY\", \"TITLE\", \"STATUS\", \"PRIORITY\"}\n\t\trows := [][]string{{\n\t\t\tissueDisplayKey(issue),\n\t\t\tstrVal(issue, \"title\"),\n\t\t\tstrVal(issue, \"status\"),\n\t\t\tstrVal(issue, \"priority\"),\n\t\t}}\n\t\tcli.PrintTable(os.Stdout, headers, rows)","sourceCodeStart":1642,"sourceCodeEnd":1678,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1642-L1678","documentation":"Error \"reorder issue: %w\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:1660 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Refresh the board and retry the reorder."],"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-15T17:31:12.345Z"}