{"record":{"id":"afcfdcd5d8f3bd18","repo":"multica-ai/multica","slug":"value-q-is-not-a-valid-bool-expected-true-or-fal-afcfdc","errorCode":null,"errorMessage":"value %q is not a valid bool (expected true or false)","messagePattern":"value %q is not a valid bool \\(expected true or false\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_property.go","lineNumber":484,"sourceCode":"\t\t\t}\n\t\t\tid, err := resolveOption(part)\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tids = append(ids, id)\n\t\t}\n\t\tif len(ids) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"--value must list at least one option; valid options: %s\", strings.Join(optionNames, \", \"))\n\t\t}\n\t\treturn json.Marshal(ids)\n\tcase \"number\":\n\t\tif _, err := strconv.ParseFloat(raw, 64); err != nil {\n\t\t\treturn nil, fmt.Errorf(\"value %q is not a valid number\", raw)\n\t\t}\n\t\treturn json.RawMessage(raw), nil\n\tcase \"checkbox\":\n\t\tif raw != \"true\" && raw != \"false\" {\n\t\t\treturn nil, fmt.Errorf(\"value %q is not a valid bool (expected true or false)\", raw)\n\t\t}\n\t\treturn json.RawMessage(raw), nil\n\tdefault: // text, date, url — validated server-side\n\t\treturn json.Marshal(raw)\n\t}\n}\n\n// formatIssuePropertyValue renders a stored value for humans: option ids\n// become option names, everything else prints via formatMetadataValue.\nfunc formatIssuePropertyValue(property propertyDTO, value any) string {\n\toptionName := func(id string) string {\n\t\tfor _, opt := range property.Config.Options {\n\t\t\tif opt.ID == id {\n\t\t\t\treturn opt.Name\n\t\t\t}\n\t\t}\n\t\treturn id\n\t}","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_property.go#L466-L502","documentation":"Returned by `encodeIssuePropertyValue` when a checkbox-typed property receives a `--value` that is not exactly the string `true` or `false`. The check is strict string equality (no `1/0`, `yes/no`, or case variants).","triggerScenarios":"`--value True`, `--value 1`, `--value yes`, `--value on`, or `--value \"\"` on a property of type `checkbox`.","commonSituations":"Scripts emitting shell-style booleans (`0`/`1`) or capitalized `True` from Python/JSON tooling; assuming case-insensitive parsing.","solutions":["Pass exactly `--value true` or `--value false` (lowercase).","Normalize upstream output in the script: `printf '%s' \"$VAL\" | tr '[:upper:]' '[:lower:]'` and map 1/0, yes/no to true/false.","To clear a checkbox value entirely, use `issue property unset` rather than an empty string."],"exampleFix":"# before\nmultica issue property set ISS-1 --name Blocked --value \"True\"\n# error: value \"True\" is not a valid bool (expected true or false)\n\n# after\nVAL=$(printf '%s' \"$VAL\" | tr '[:upper:]' '[:lower:]')\nmultica issue property set ISS-1 --name Blocked --value \"$VAL\"","handlingStrategy":"validation","validationCode":"# bash: normalize boolean-ish inputs to exactly true/false\nVAL=$(printf '%s' \"$VAL\" | tr '[:upper:]' '[:lower:]')\ncase \"$VAL\" in 1|yes|y|on) VAL=true;; 0|no|n|off) VAL=false;; esac\n[ \"$VAL\" = true ] || [ \"$VAL\" = false ] || { echo 'bad bool' >&2; exit 1; }","typeGuard":"func isStrictBool(raw string) bool { return raw == \"true\" || raw == \"false\" }","tryCatchPattern":null,"preventionTips":["Only lowercase `true`/`false` are accepted — no 1/0, yes/no, or capitalization.","Normalize upstream boolean formats in the calling script."],"tags":["go","cli","validation","checkbox","boolean"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}