{"record":{"id":"2bfb7ef953b421e9","repo":"multica-ai/multica","slug":"title-is-required-2bfb7e","errorCode":null,"errorMessage":"--title is required","messagePattern":"--title is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_issue.go","lineNumber":1070,"sourceCode":"\treturn out\n}\n\nfunc quickCreateAttachmentIDsFromEnv() ([]string, error) {\n\traw := strings.TrimSpace(os.Getenv(\"MULTICA_QUICK_CREATE_ATTACHMENT_IDS\"))\n\tif raw == \"\" {\n\t\treturn nil, nil\n\t}\n\tvar ids []string\n\tif err := json.Unmarshal([]byte(raw), &ids); err != nil {\n\t\treturn nil, fmt.Errorf(\"parse MULTICA_QUICK_CREATE_ATTACHMENT_IDS: %w\", err)\n\t}\n\treturn appendUniqueStrings(nil, ids...), nil\n}\n\nfunc runIssueCreate(cmd *cobra.Command, _ []string) error {\n\ttitle, _ := cmd.Flags().GetString(\"title\")\n\tif title == \"\" {\n\t\treturn fmt.Errorf(\"--title is required\")\n\t}\n\tstatusFlag, _ := cmd.Flags().GetString(\"status\")\n\tif statusFlag != \"\" {\n\t\tif err := validateIssueStatus(statusFlag); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\tpriorityFlag, _ := cmd.Flags().GetString(\"priority\")\n\tif priorityFlag != \"\" {\n\t\tif err := validateIssuePriority(priorityFlag); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tclient, err := newAPIClient(cmd)\n\tif err != nil {\n\t\treturn err\n\t}","sourceCodeStart":1052,"sourceCodeEnd":1088,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_issue.go#L1052-L1088","documentation":"`multica issue create` was run without a usable --title; the flag is empty and the CLI refuses to create a titleless issue. This is the first check in runIssueCreate, before any validation or API call, so nothing is sent to the server.","triggerScenarios":"Running `multica issue create` with no --title at all, --title \"\" (explicitly empty), or --title \"$TITLE\" where the shell variable is unset/empty (no default word).","commonSituations":"Scripts forwarding an optional variable: --title \"$TITLE\" with set -u not in effect; automation where the upstream step that extracts a title produced nothing; interactive use expecting a prompt (the CLI does not prompt — it errors).","solutions":["Pass a non-empty --title: multica issue create --title \"Fix login expiry\".","If the value comes from a variable, guard the call: [ -n \"$TITLE\" ] && multica issue create --title \"$TITLE\" || echo 'TITLE empty' >&2.","Fix the upstream extraction (jq selector, grep) that was supposed to produce the title."],"exampleFix":"# before\nmultica issue create --title \"$TITLE\"   # TITLE unset -> error\n# after\n: \"${TITLE:?TITLE must be set to create an issue}\"\nmultica issue create --title \"$TITLE\"","handlingStrategy":"validation","validationCode":"# fail before the CLI if the title is empty\n : \"${TITLE:?TITLE must be non-empty to create an issue}\"\nmultica issue create --title \"$TITLE\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use : \"${VAR:?msg}\" guards for every required variable forwarded as a flag.","The CLI never prompts for --title; scripts must validate it themselves.","Validate title extraction (jq/grep selectors) with a non-empty check before use."],"tags":["cli","validation","issue-create","required-flag"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}