{"record":{"id":"e965ac159b1af92d","repo":"hcengineering/platform","slug":"project-not-found-issue-clickupprojectname-fo","errorCode":null,"errorMessage":"Project not found: ${issue.clickupProjectName} (for task: ${clickupId})","messagePattern":"Project not found: (.+?) \\(for task: (.+?)\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/importer/src/clickup/clickup.ts","lineNumber":169,"sourceCode":"        identifier,\n        private: false,\n        autoJoin: false,\n        projectType: importProjectType,\n        docs: []\n      })\n    }\n\n    for (const [clickupId, issue] of importIssuesByClickupId) {\n      if (!this.clickupBlankString(issue.clickupParentId)) {\n        const parent = importIssuesByClickupId.get(issue.clickupParentId as string)\n        if (parent === undefined) {\n          throw new Error(`Parent not found: ${issue.clickupParentId} (for task: ${clickupId})`)\n        }\n        parent.subdocs.push(issue)\n      } else if (!this.clickupBlankString(issue.clickupProjectName)) {\n        const project = importProjectsByName.get(issue.clickupProjectName as string)\n        if (project === undefined) {\n          throw new Error(`Project not found: ${issue.clickupProjectName} (for task: ${clickupId})`)\n        }\n        project.docs.push(issue)\n      } else {\n        throw new Error(`Task cannot be imported: ${clickupId} (No parent)`)\n      }\n    }\n\n    return {\n      projects: Array.from(importProjectsByName.values()),\n      projectType: importProjectType\n    }\n  }\n\n  private clickupBlankString (str: string | undefined): boolean {\n    if (str === undefined || str === null) return true\n    return str.trim().length === 0 || str === 'null'\n  }\n","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/hcengineering/platform/blob/63e28dc96483967b2fc21c881b3f1023c1de7718/packages/importer/src/clickup/clickup.ts#L151-L187","documentation":"In `processClickupTasks`, an issue with a blank parent id but a non-blank `clickupProjectName` must map to a project already registered in `importProjectsByName`. If no project with that exact name exists, the import throws with the project name and task id. The task cannot be attached to any project document.","triggerScenarios":"An import issue carries a project name that does not match any project in `importProjectsByName`: name mismatch (typo/case/whitespace), the target project was not imported, or the name changed in ClickUp.","commonSituations":"Project renamed in ClickUp after a previous mapping; importing tasks into a project name that is only created by another importer step not yet run; case-sensitivity or trailing-space differences between ClickUp and Huly project names; partial import where project definitions were skipped.","solutions":["Verify the exact project name on the ClickUp task matches an imported Huly project (watch case/whitespace)","Import or create the missing project first, then re-run the task import","Correct the clickupProjectName field on the task or in the import mapping","Ensure project-defining inputs are included in the same import run as the tasks"],"exampleFix":"// before\nclickupProjectName: '  Design ' // trailing space; Huly project is 'Design'\n// after\nclickupProjectName: 'Design' // exact match with imported project name","handlingStrategy":"validation","validationCode":"const knownProjects = new Set(Array.from(importProjectsByName.keys()))\nfor (const [id, issue] of importIssuesByClickupId) {\n  if (!issue.clickupParentId && issue.clickupProjectName && !knownProjects.has(issue.clickupProjectName)) {\n    console.warn(`task ${id}: project '${issue.clickupProjectName}' not in import set`)\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  await importer.processClickupTasks(tasks)\n} catch (err) {\n  const m = /Project not found: (.+?) \\(for task/.exec((err as Error).message)\n  if (m) console.error(`create/import project '${m[1]}' first`)\n  throw err\n}","preventionTips":["Compare project names exactly (case/whitespace)","Create or import target projects before task import","Keep ClickUp project names in sync with Huly","Run project-defining steps in the same import run"],"tags":["import","clickup","data-integrity","naming"],"backgroundTag":"referenced-entity-not-found","analyzedSha":"63e28dc96483967b2fc21c881b3f1023c1de7718","analyzedAt":"2026-08-29T15:21:27.377Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}