Repository navigation
docs(leads): only web-to-lead reaches the round-robin; an import makes the importer the owner (#2360) - #2361
Conversation
…port makes the importer the owner The Leads page said CSV import and API capture leave a lead ownerless and so reach lead_auto_assign. Measured on 18.2.0: an import (CSV with the shipped mapping, or JSON) and an API create under a session or API key are stamped with the caller as owner; only the anonymous web-to-lead form reaches the round-robin. The page now says so and links the Admin Manual's import page. task.hook.ts's header said the reminder check warns; it refuses with VALIDATION_FAILED / 400. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAo4oRPhkffQUg8HR7n
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAo4oRPhkffQUg8HR7n
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
席位核对Verdict: ACCEPT ·
Generated by Claude Code |
Requested by Irene · project thread
Fixes #2360
Clause-②: no
Metadata-protocol: none
维护者速读
task.hook.ts头注释里的「警告」改成「拒绝」。只改文字,不改任何行为。lead_auto_assign分给负载最轻的代表;其余入口在钩子运行前已被平台盖上写入者为负责人。用户手册和管理员手册因此互相矛盾。提醒晚于截止日期的任务会被 400 拒绝,不是警告。src/docs/crm_sales_leads.md第 32–42 行;src/docs/crm_sales_leads.zh.md第 21–23 行。npx vitest run test/docs-drift.test.ts test/docs-books.test.ts,预期全部通过。What changes
src/docs/crm_sales_leads.mdand.zh.md: the round-robin sentence names one door, web-to-lead, because it is the only door measured to leave a lead ownerless. A new paragraph says that a lead a person puts in keeps that person as owner (UI, API under a sign-in or an API key, file import), that an import never reaches the round-robin, and it links./crm_admin_data_import.md, which batch 2 wrote to the same measurement. The en and zh pages say the same thing.src/sales/objects/task.hook.ts, header comment only: "Warns whenreminder_dateis afterdue_date" now reads "Refuses (VALIDATION_FAILED/ 400) …", which is what the handler at:140does..changeset/leads-help-import-owner.md: a patch changeset, since the manual ships in the artifact.docs-driftdoes not pin the lead sentence (it pins the hot-lead threshold on this page), so no test changes.Tests
Every probe ran on the shipped artifact (
dist/objectstack.jsonfrom this branch'spnpm build, served byobjectstack dev -aon ObjectStack 18.2.0) afterpnpm demo:staff, so the rep pool isna.repandeu.rep(both holders ofsales_rep, each owning 0 open leads). Neither the dev admin norsales.manageris in the pool, so an owner of admin or manager cannot be a round-robin pick.lead_auto_assign?POST /api/v1/forms/contact-us/submit→ 201eu.rep(a pool member),lead_source: web,created_bynullPOST /api/v1/data/crm_lead/import,mappingName: crm_lead_import, blank "Lead Owner Email" → 200, created 1sales.manager/ asna.rep→ 200, created 1 eachPOST …/crm_lead/import,format: json→ 200POST /api/v1/data/crm_leadas admin / assales.manager, no owner → 201sales.manageratPOST /api/v1/keys, thenPOST /api/v1/data/crm_leadwithx-api-key→ 201sales.manager(the key holder)test/hooks-runtime.test.ts›lead_auto_assign› "assigns an ownerless lead to the rep with the fewest open leads" pins that it is routedThe PM mechanism assumption holds: an admin's import of a blank-owner lead row makes the importer the owner.
Item 2, on the same server, as
sales.manager:POST /api/v1/data/crm_taskwithdue_date: 2026-11-10,reminder_date: 2026-11-12T09:00:00Z→ 400VALIDATION_FAILED, "Reminder (2026-11-12T09:00:00Z) is after the due date (2026-11-10); reminders should fire before the deadline." Control, reminder on 2026-11-08 → 201.Acceptance notes
crm_admin_data_importpoints into the Admin Manual, which onlysystem_adminreads. A sales rep who follows it gets the platform's doc access refusal (read on 18.2.0 in In-app docs, batch 1: a Help group at the end of the HotCRM menu, three books, and the four package docs split into nine with Chinese variants #2327), so the prose calls it "the administrator's Importing Data page" and says enough on its own (blank owner ⇒ the importer; reassign afterwards).content/docs/administration/setup.mdx:68and its.zh-Hans.mdx:68/.zh-Hant.mdx:70siblings make the same claim ("An ownerless lead — web-to-lead, CSV import, API capture — is assigned on insert …"). That is the product site, not this card's file surface.Verification
pnpm verifyon head976deca(validate, typecheck,lint --strict, hygiene, token ratchet, build,vitest run), exit 0: "Validation passed", lint 0 errors (19 suggestions, as on main), "source hygiene clean", "source token ratchet clean", Test Files 242 passed (242), Tests 4606 passed, 1 skipped (4607), 653 s. That run includestest/docs-drift.test.ts,test/docs-books.test.tsandtest/hooks-runtime.test.ts(the system-write case cited above).Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01J8VVAo4oRPhkffQUg8HR7n