{"record":{"id":"c1dafcae4a1a1a40","repo":"jackwener/OpenCLI","slug":"config-c1dafc","errorCode":"CONFIG","errorMessage":"task uuid required","messagePattern":"task uuid required","errorType":"error_code","errorClass":"CliError","httpStatus":null,"severity":"error","filePath":"clis/ones/worklog.js","lineNumber":152,"sourceCode":"        },\n        {\n            name: 'note',\n            type: 'str',\n            required: false,\n            help: 'Optional note (written to description/desc)',\n        },\n        {\n            name: 'owner',\n            type: 'str',\n            required: false,\n            help: 'Owner user UUID (defaults to current logged-in user)',\n        },\n    ],\n    columns: ['task', 'date', 'hours', 'owner', 'endpoint'],\n    func: async (page, kwargs) => {\n        const taskId = String(kwargs.task ?? '').trim();\n        if (!taskId) {\n            throw new CliError('CONFIG', 'task uuid required', 'Pass the work item uuid from opencli ones my-tasks or the URL.');\n        }\n        const team = kwargs.team?.trim() ||\n            process.env.ONES_TEAM_UUID?.trim() ||\n            process.env.ONES_TEAM_ID?.trim();\n        if (!team) {\n            throw new CliError('CONFIG', 'team UUID required', 'Pass --team or set ONES_TEAM_UUID (from …/team/<team>/…).');\n        }\n        const hoursHuman = Number(String(kwargs.hours ?? '').replace(/,/g, ''));\n        if (!Number.isFinite(hoursHuman) || hoursHuman <= 0 || hoursHuman > 1000) {\n            throw new CliError('CONFIG', 'hours must be a positive number (hours)', 'Example: opencli ones worklog <taskUUID> 2 --team <teamUUID>');\n        }\n        const dateArg = kwargs.date?.trim();\n        const dateStr = dateArg || todayLocalYmd();\n        if (!validateYmd(dateStr)) {\n            throw new CliError('CONFIG', 'invalid --date', 'Use YYYY-MM-DD, e.g. 2026-03-24.');\n        }\n        const note = String(kwargs.note ?? '').trim();\n        const rawManhour = hoursToOnesManhourRaw(hoursHuman);","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/ones/worklog.js#L134-L170","documentation":"This CONFIG error is thrown by the ONES worklog command (clis/ones/worklog.js) when the task UUID argument is missing or blank. A worklog entry must be attached to a specific work item, identified by its uuid; without it the command cannot proceed.","triggerScenarios":"Running `opencli ones worklog` without the task uuid positional/argument, or passing only whitespace (kwargs.task trims to empty).","commonSituations":"Users try to log time without knowing the task id; automation scripts omit the task parameter; users pass a task number/title instead of the uuid.","solutions":["Pass the work item uuid: opencli ones worklog <taskUUID> <hours> --team <teamUUID>.","Find the uuid via `opencli ones my-tasks` or copy it from the ONES task URL …/task/<id>.","Fix the calling script so it forwards the task argument."],"exampleFix":"// before\nopencli ones worklog 2 --team T1        // missing task uuid\n// after\nopencli ones worklog 3fa2b1c9d8e7f601 2 --team T1","handlingStrategy":"validation","validationCode":"const taskId = String(kwargs.task ?? '').trim();\nif (!taskId) throw new Error('worklog requires a task uuid (see opencli ones my-tasks)');","typeGuard":"function hasTask(a) { return typeof a.task === 'string' && a.task.trim().length > 0; }","tryCatchPattern":"try {\n  await opencli.ones.worklog({ task: taskId, hours, team });\n} catch (e) {\n  if (e.code === 'CONFIG' && e.message === 'task uuid required') { console.error('Pass the task uuid from my-tasks or the URL.'); }\n  else throw e;\n}","preventionTips":["Fetch task uuids programmatically via opencli ones my-tasks.","Never substitute task numbers/titles for uuids.","Assert required fields in wrapper scripts before invoking the CLI."],"tags":["config","cli","missing-argument","ones"],"backgroundTag":"missing-required-config","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}