{"record":{"id":"fe734eb43da181e2","repo":"multica-ai/multica","slug":"before-requires-an-issue-id-or-key","errorCode":null,"errorMessage":"--before requires an issue ID or key","messagePattern":"--before requires an issue ID or key","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1534,"sourceCode":"// (status) is left untouched, so cross-column moves still go through\n// `issue status`.\nfunc runIssueReorder(cmd *cobra.Command, args []string) error {\n\tbefore, _ := cmd.Flags().GetString(\"before\")\n\tafter, _ := cmd.Flags().GetString(\"after\")\n\ttop, _ := cmd.Flags().GetBool(\"top\")\n\tbottom, _ := cmd.Flags().GetBool(\"bottom\")\n\n\t// \"Exactly one of --before/--after/--top/--bottom\" is enforced declaratively\n\t// by the command's mutually-exclusive, one-required flag group (see\n\t// registerIssueReorderFlags), so cobra rejects zero-target and multi-target\n\t// invocations before RunE runs. Cobra keys off flag *presence* (Changed),\n\t// not value, so guard the cases it cannot see: a --before/--after passed\n\t// empty (e.g. an unset shell variable), or a --top/--bottom explicitly set\n\t// to false (e.g. `--top=false` from a generated command). Each counts as\n\t// \"set\" for the group yet selects no real target, and would otherwise fall\n\t// through to a confusing \"not found in column\" error.\n\tif cmd.Flags().Changed(\"before\") && before == \"\" {\n\t\treturn fmt.Errorf(\"--before requires an issue ID or key\")\n\t}\n\tif cmd.Flags().Changed(\"after\") && after == \"\" {\n\t\treturn fmt.Errorf(\"--after requires an issue ID or key\")\n\t}\n\tif cmd.Flags().Changed(\"top\") && !top {\n\t\treturn fmt.Errorf(\"--top cannot be set to false; pass it on its own to move the issue to the top of its column\")\n\t}\n\tif cmd.Flags().Changed(\"bottom\") && !bottom {\n\t\treturn fmt.Errorf(\"--bottom cannot be set to false; pass it on its own to move the issue to the bottom of its column\")\n\t}\n\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()","sourceCodeStart":1516,"sourceCodeEnd":1552,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1516-L1552","documentation":"Error \"--before requires an issue ID or key\" thrown in multica-ai/multica.","triggerScenarios":"Thrown at server/cmd/multica/cmd_issue.go:1534 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an issue ID or key to --before."],"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"}