{"record":{"id":"a25bcdaabfe41720","repo":"paperclipai/paperclip","slug":"missing-target-stage","errorCode":null,"errorMessage":"Missing target stage","messagePattern":"Missing target stage","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ui/src/pages/Pipelines.tsx","lineNumber":2630,"sourceCode":"  });\n\n  const removeStage = useMemo(\n    () => stages.find((stage) => stage.kind === \"cancelled\") ?? stages.find((stage) => stage.key === \"cancelled\") ?? null,\n    [stages],\n  );\n  const moveStageOptions = useMemo(\n    () => stages\n      .filter((stage) => stage.id !== detail?.stage.id)\n      .sort((left, right) => left.position - right.position),\n    [detail?.stage.id, stages],\n  );\n  const selectedMoveStage = useMemo(\n    () => moveStageOptions.find((stage) => stage.key === moveStageKey) ?? null,\n    [moveStageKey, moveStageOptions],\n  );\n  const moveItemToStage = useMutation({\n    mutationFn: () => {\n      if (!selectedMoveStage || !detail?.case.version) throw new Error(\"Missing target stage\");\n      return pipelinesApi.transitionCase(caseId, {\n        toStageKey: selectedMoveStage.key,\n        expectedVersion: detail.case.version,\n        reason: `Manual board override from item page: moved from ${detail.stage.name} to ${selectedMoveStage.name}.`,\n        force: true,\n      });\n    },\n    onSuccess: async () => {\n      setMoveDialogOpen(false);\n      setMoveStageKey(\"\");\n      await invalidateItem();\n      pushToast({ title: \"Item moved\", tone: \"success\" });\n    },\n    onError: () => pushToast({ title: \"Could not move the item\", tone: \"error\" }),\n  });\n  const removeItem = useMutation({\n    mutationFn: () => {\n      if (!removeStage || !detail?.case.version) throw new Error(\"Missing removal stage\");","sourceCodeStart":2612,"sourceCodeEnd":2648,"githubUrl":"https://github.com/paperclipai/paperclip/blob/01ad8584922b5d85292b1723cae71fa0d9b07a19/ui/src/pages/Pipelines.tsx#L2612-L2648","documentation":"Error \"Missing target stage\" thrown in paperclipai/paperclip.","triggerScenarios":"Thrown at ui/src/pages/Pipelines.tsx:2629 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Select a target stage before moving the item."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ad8584922b5d85292b1723cae71fa0d9b07a19","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}