{"record":{"id":"722fbea4864b4830","repo":"multica-ai/multica","slug":"value-is-required-722fbe","errorCode":null,"errorMessage":"--value is required","messagePattern":"--value is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"server/cmd/multica/cmd_property.go","lineNumber":614,"sourceCode":"\tif err != nil {\n\t\treturn err\n\t}\n\trows := buildIssuePropertyRows(properties, bag)\n\toutput, _ := cmd.Flags().GetString(\"output\")\n\tif output == \"json\" {\n\t\treturn cli.PrintJSON(os.Stdout, rows)\n\t}\n\tprintIssuePropertyRows(rows)\n\treturn nil\n}\n\nfunc runIssuePropertySet(cmd *cobra.Command, args []string) error {\n\tname, _ := cmd.Flags().GetString(\"name\")\n\tif name == \"\" {\n\t\treturn fmt.Errorf(\"--name is required\")\n\t}\n\tif !cmd.Flags().Changed(\"value\") {\n\t\treturn fmt.Errorf(\"--value is required\")\n\t}\n\trawValue, _ := cmd.Flags().GetString(\"value\")\n\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}\n\tctx, cancel := cli.APIContext(context.Background())\n\tdefer cancel()\n\n\tissueRef, err := resolveIssueRef(ctx, client, args[0])\n\tif err != nil {\n\t\treturn fmt.Errorf(\"resolve issue: %w\", err)\n\t}\n\tproperties, err := fetchProperties(ctx, client)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":596,"sourceCodeEnd":632,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L596-L632","documentation":"Returned by `runIssuePropertySet` when `--value` was never changed on the command line (`cmd.Flags().Changed(\"value\")` is false). Note it requires the flag to be explicitly present — a defaulted empty value is not accepted — because the set operation is meaningless without a value.","triggerScenarios":"Running `issue property set` with `--name` but no `--value`; note that even `--value \"\"` satisfies Changed() but then fails later in value encoding for typed properties.","commonSituations":"Users expect set with only `--name` to clear a value; scripts conditionally omit `--value` when a variable is empty.","solutions":["Always pass `--value <something>` when setting.","To clear a property, use `multica issue property unset <issue> --name <prop>` instead.","In scripts, branch: if the value variable is empty, call unset; otherwise call set."],"exampleFix":"// before\nmultica issue property set ISS-1 --name Priority\n// error: --value is required\n\n// after (clear)  : multica issue property unset ISS-1 --name Priority\n// after (set)    : multica issue property set ISS-1 --name Priority --value P1","handlingStrategy":"validation","validationCode":"# bash: branch on emptiness — unset when clearing, set when provided\nif [ -z \"$VAL\" ]; then multica issue property unset \"$ISSUE\" --name \"$PROP_NAME\"; else multica issue property set \"$ISSUE\" --name \"$PROP_NAME\" --value \"$VAL\"; fi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["`--value` must be explicitly present for set; empty string will fail later in encoding.","Use the unset subcommand to clear values."],"tags":["go","cli","validation","flags"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}