multica-ai/multica · error

--value must list at least one option; valid options: %s

Error message

--value must list at least one option; valid options: %s

What it means

Returned by `encodeIssuePropertyValue` for multi_select properties when `--value` contained only empty segments after splitting on commas (e.g. `--value ""` or `--value ",,"`), so zero option IDs were collected. The message lists the valid option names.

Source

Thrown at server/cmd/multica/cmd_property.go:474

		if err != nil {
			return nil, err
		}
		return json.Marshal(id)
	case "multi_select":
		parts := strings.Split(raw, ",")
		ids := make([]string, 0, len(parts))
		for _, part := range parts {
			if strings.TrimSpace(part) == "" {
				continue
			}
			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

View on GitHub (pinned to 2c0912b6ec)

Solutions

  1. Pass at least one valid option name/ID: `--value "P0"` or `--value "P0,P1"`.
  2. If the intent was to clear the value, use `multica issue property unset` instead of setting an empty list.
  3. In scripts, guard: skip the call (or unset) when the composed value string is empty/whitespace.

Example fix

// before
VAL=""
multica issue property set ISS-1 --name Tags --value "$VAL"
// error: --value must list at least one option; valid options: ...

// after
VAL=""
if [ -z "$VAL" ]; then multica issue property unset ISS-1 --name Tags; else multica issue property set ISS-1 --name Tags --value "$VAL"; fi
Defensive patterns

Strategy: validation

Validate before calling

# bash: never pass an all-empty multi_select value
[ -n "$(printf '%s' "$VAL" | tr -d '[:space:],')" ] || { echo 'empty multi_select value' >&2; exit 1; }

Type guard

func hasNonEmptySegments(raw string) bool {
    for _, part := range strings.Split(raw, ",") {
        if strings.TrimSpace(part) != "" {
            return true
        }
    }
    return false
}

Prevention

When it happens

Trigger: `--value ""`, `--value " , "` or `--value ",,"` on a multi_select property — every comma-separated part trims to empty and is skipped, leaving `ids` empty.

Common situations: Scripts passing an unset shell variable (`--value "$VAL"` with VAL empty) intending to clear a multi_select; copy-paste of a comma placeholder.

Related errors


AI-assisted analysis of multica-ai/multica@2c0912b6ec (2026-08-15). Data as JSON: /api/errors/9b5324a3732bae2a. Report an issue: GitHub.