{"record":{"id":"d0a1646a6f5dc155","repo":"BloopAI/vibe-kanban","slug":"can-only-duplicate-one-issue-at-a-time","errorCode":null,"errorMessage":"Can only duplicate one issue at a time","messagePattern":"Can only duplicate one issue at a time","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/web-core/src/shared/actions/index.ts","lineNumber":1452,"sourceCode":"      if (result === 'confirmed' && ctx.projectMutations?.removeIssue) {\n        for (const issueId of issueIds) {\n          ctx.projectMutations.removeIssue(issueId);\n        }\n      }\n    },\n  } satisfies IssueActionDefinition,\n\n  DuplicateIssue: {\n    id: 'duplicate-issue',\n    label: 'Duplicate Issue',\n    icon: CopyIcon,\n    shortcut: 'I D',\n    requiresTarget: ActionTargetType.ISSUE,\n    isVisible: (ctx) =>\n      ctx.layoutMode === 'kanban' && ctx.hasSelectedKanbanIssue,\n    execute: async (ctx, _projectId, issueIds) => {\n      if (issueIds.length !== 1) {\n        throw new Error('Can only duplicate one issue at a time');\n      }\n      ctx.projectMutations?.duplicateIssue(issueIds[0]);\n    },\n  } satisfies IssueActionDefinition,\n\n  MarkBlocking: {\n    id: 'mark-blocking',\n    label: 'Mark Blocking',\n    icon: ArrowBendUpRightIcon,\n    requiresTarget: ActionTargetType.ISSUE,\n    isVisible: (ctx) =>\n      ctx.layoutMode === 'kanban' && ctx.hasSelectedKanbanIssue,\n    execute: async (ctx, projectId, issueIds) => {\n      if (issueIds.length === 1) {\n        await ctx.openRelationshipSelection(\n          projectId,\n          issueIds[0],\n          'blocking',","sourceCodeStart":1434,"sourceCodeEnd":1470,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/packages/web-core/src/shared/actions/index.ts#L1434-L1470","documentation":"The DuplicateIssue kanban action requires exactly one selected issue; the client-side guard in execute() throws this Error when issueIds.length !== 1 (i.e. zero or multiple issues selected). duplicateIssue on the project mutations only supports a single issue id.","triggerScenarios":"Pressing the 'I D' duplicate shortcut (or invoking the Duplicate action) in kanban layout while multiple issues are selected via multi-select, or with an empty selection.","commonSituations":"Users shift/ctrl-clicking several kanban cards and then hitting duplicate; keyboard-driven action palette invoked with a stale or multi-item selection; a misconfigured shortcut context passing the whole selection.","solutions":["Select exactly one issue card before running Duplicate","Clear multi-selection (click a single card) and retry","If you need to duplicate many issues, run Duplicate once per issue or script it via the API rather than the multi-select action"],"exampleFix":"// before\nif (issueIds.length !== 1) {\n  throw new Error('Can only duplicate one issue at a time');\n}\n// after\nif (issueIds.length === 0) return;\nissueIds.forEach((id) => ctx.projectMutations?.duplicateIssue(id));","handlingStrategy":"validation","validationCode":"if (!issueIds || issueIds.length !== 1) {\n  showToast('Select exactly one issue to duplicate');\n  return;\n}","typeGuard":"function hasSingleSelection(ids: string[] | undefined): ids is [string] {\n  return Array.isArray(ids) && ids.length === 1;\n}","tryCatchPattern":"try {\n  ctx.projectMutations?.duplicateIssue(issueIds[0]);\n} catch (e) {\n  showToast((e as Error).message);\n}","preventionTips":["Disable the Duplicate action in the action palette when selection size !== 1 via isEnabled","Clear multi-selections before keyboard shortcuts","Communicate single-issue constraints in the action's label or tooltip"],"tags":["kanban","ui-action","client-side-validation"],"backgroundTag":"invalid-argument-count","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}