multica-ai/multica · error
value %q is not a valid bool (expected true or false)
Error message
value %q is not a valid bool (expected true or false)
What it means
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).
Source
Thrown at server/cmd/multica/cmd_property.go:484
}
id, err := resolveOption(part)
if err != nil {
return nil, err
}
ids = append(ids, id)
}
if len(ids) == 0 {
return nil, fmt.Errorf("--value must list at least one option; valid options: %s", strings.Join(optionNames, ", "))
}
return json.Marshal(ids)
case "number":
if _, err := strconv.ParseFloat(raw, 64); err != nil {
return nil, fmt.Errorf("value %q is not a valid number", raw)
}
return json.RawMessage(raw), nil
case "checkbox":
if raw != "true" && raw != "false" {
return nil, fmt.Errorf("value %q is not a valid bool (expected true or false)", raw)
}
return json.RawMessage(raw), nil
default: // text, date, url — validated server-side
return json.Marshal(raw)
}
}
// formatIssuePropertyValue renders a stored value for humans: option ids
// become option names, everything else prints via formatMetadataValue.
func formatIssuePropertyValue(property propertyDTO, value any) string {
optionName := func(id string) string {
for _, opt := range property.Config.Options {
if opt.ID == id {
return opt.Name
}
}
return id
}View on GitHub (pinned to 2c0912b6ec)
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.
Example fix
# before multica issue property set ISS-1 --name Blocked --value "True" # error: value "True" is not a valid bool (expected true or false) # after VAL=$(printf '%s' "$VAL" | tr '[:upper:]' '[:lower:]') multica issue property set ISS-1 --name Blocked --value "$VAL"
Defensive patterns
Strategy: validation
Validate before calling
# bash: normalize boolean-ish inputs to exactly true/false
VAL=$(printf '%s' "$VAL" | tr '[:upper:]' '[:lower:]')
case "$VAL" in 1|yes|y|on) VAL=true;; 0|no|n|off) VAL=false;; esac
[ "$VAL" = true ] || [ "$VAL" = false ] || { echo 'bad bool' >&2; exit 1; } Type guard
func isStrictBool(raw string) bool { return raw == "true" || raw == "false" } Prevention
- Only lowercase `true`/`false` are accepted — no 1/0, yes/no, or capitalization.
- Normalize upstream boolean formats in the calling script.
When it happens
Trigger: `--value True`, `--value 1`, `--value yes`, `--value on`, or `--value ""` on a property of type `checkbox`.
Common situations: Scripts emitting shell-style booleans (`0`/`1`) or capitalized `True` from Python/JSON tooling; assuming case-insensitive parsing.
Related errors
- %s must be 'true' or 'false' (got %q)
- invalid direction %q (want \"up\" or \"down\")
- --name is required
- --runtime-id is required
- --runtime-config must be valid JSON: %w
AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15).
Data as JSON: /api/errors/afcfdcd5d8f3bd18.
Report an issue: GitHub.