← Re: [CSplus/RelationshipCRM] feat: Zoho CRM CSV移行機能 (PR #13)
メール履歴を編集
送受信区分
*
送信
受信
日時
*
件名
*
本文
@chatgpt-codex-connector[bot] commented on this pull request. ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `696831d522` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". </details> > + }); + ref.id = created.id; + } + ctx.companyByName.set(norm, ref); + if (values.zohoId) ctx.companyByExternalId.set(values.zohoId, ref); + if (domain) ctx.companyByDomain.set(domain, ref); + result.created++; +} + +async function importContactRow( + ctx: ImportContext, + values: Record<string, string>, + mode: DuplicateMode, + result: ImportResult, +): Promise<void> { + const company = await resolveOrCreateCompany(ctx, values); **<sub><sub></sub></sub> Avoid creating companies before skipping duplicate contacts** When CONTACTS are imported with duplicate mode `skip` and a row matches an existing contact, this call has already run `resolveOrCreateCompany`. If the CSV row names a company that is not yet in the CRM, the import creates that Company and then skips the Contact at lines 449-451, so the default “skip duplicates” mode still mutates data and can leave orphan/incorrect companies even though the preview reports only skipped rows. Useful? React with 👍 / 👎. > + ...(ctx.contactsByName.get(fullName) ?? []), + ref, + ]); + ctx.contactByNameAndCompany.set(`${fullName}|${company?.id ?? ""}`, ref); + result.created++; +} + +async function importDealRow( + ctx: ImportContext, + values: Record<string, string>, + mode: DuplicateMode, + result: ImportResult, +): Promise<void> { + const existing = ctx.caseByExternalId.get(values.zohoId) ?? null; + + const company = await resolveOrCreateCompany(ctx, values); **<sub><sub></sub></sub> Avoid creating companies before skipping duplicate deals** For DEALS imports, an existing case is detected before this line, but `resolveOrCreateCompany` is still called before the `mode === "skip"` return. If a re-imported/skipped deal references a company name or Zoho account ID that is not already present, the import creates that Company and then skips the deal, so selecting “skip” does not actually leave the database unchanged. Useful? React with 👍 / 👎. -- Reply to this email directly or view it on GitHub: https://github.com/CSplus/RelationshipCRM/pull/13#pullrequestreview-4678241764 You are receiving this because you modified the open/close state. Message ID: <CSplus/RelationshipCRM/pull/13/review/4678241764@github.com>
会社または連絡先のどちらか一方は必ず指定してください(両方も可)
連絡先(相手)
指定なし
会社
指定なし
連絡先を選ぶと所属会社が自動でセットされます(変更可)
更新する