Skip to content

fix(psa): keep Schedule Type off the project task's page, drawer and form (#2769) - #2772

Merged
sunhaolin merged 1 commit into
mainfrom
claude/fix-2769-hide-schedule-type-ecbede
Nov 25, 2026
Merged

sunhaolin merged 1 commit into
mainfrom
claude/fix-2769-hide-schedule-type-ecbede

Conversation

@sunhaolin

Copy link
Copy Markdown
Collaborator

Description

Under zh-CN (and every other locale) the Schedule section of a project task showed Schedule Type (排期类型) with the raw value task or milestone: on the task's record page and in the record drawer opened from a row of the Project Plan Gantt. The field is a formula the Gantt reads through typeField to draw a milestone as a diamond; it repeats the Milestone checkbox as a machine value and nobody reads it on a page.

Fixes #2769

Metadata-impact: reviewer

Changes Made

  • src/psa/objects/project_task.object.ts: schedule_type gets hidden: true, the same way crm_account.name_normalized and crm_lead.company_normalized are kept off pages and forms. The comment beside it says why.
  • test/psa-project-tasks.test.ts: one case beside the two that already pin the value (task / milestone): the field the Gantt reads is hidden, the Milestone checkbox is not.
  • .changeset/2769-hide-schedule-type.md (patch).

No translation, view, page or manual changes. The four locale labels for the field stay (it is still a field with a label); no manual names the field.

How the Gantt diamond was verified

On a dev server of this branch (objectstack dev -p 4069, pinned @objectstack/* 18.6.0, seeded demo data, zh-CN, signed in as the dev admin):

  1. The hidden field still reaches the Gantt. The Project Plan view's own data request (GET /api/v1/data/crm_project_task?populate=…&top=10001&sort=planned_start, no select) returns schedule_type on all 23 task rows.
  2. Seeded milestones are diamonds. "Initech phase 1: customer acceptance" and the other seeded milestones are drawn as diamonds.
  3. The diamond comes from typeField, not from the dates. The console's Gantt also draws any task whose start and end are the same day as a diamond, and every seeded milestone is single-day, so step 2 alone proves nothing. I ticked Milestone on a multi-day task ("Initech phase 1: migration assessment", 2026-07-27 → 2026-08-16): its schedule_type became milestone and the Gantt drew it as a diamond. Unticking it turned it back into a bar.

On the same server, 排期类型 is absent from:

  • the task's record page (排期 shows 计划开始 / 计划结束 in the header, 前置任务);
  • the record drawer opened from the Gantt row's arrow;
  • the 新建项目任务 and 编辑项目任务 forms (fields: 项目, 任务名称, 上级任务, 任务负责人, 状态, 里程碑, 描述, 计划开始, 计划结束, 前置任务, 计划工时, 完成百分比).

Testing

  • pnpm verify (validate, typecheck, lint, hygiene, build, test) green locally
  • Manual testing in a browser, as above
  • New test added

Checklist

  • I have added a changeset
  • Metadata changes under src/ declare their class (Metadata-impact: reviewer: a helper field leaves the page; no data, permission, automation or protocol change)
  • No English doc changed, so no Chinese twin is owed

…form (#2769)

The formula the Gantt reads through typeField showed on the task's record
page and in the record drawer as a raw machine value (task / milestone),
repeating the Milestone checkbox. Mark it hidden, as the other helper
fields are. The Gantt's data request still returns it, so a milestone is
still drawn as a diamond.
@vercel

vercel Bot commented Nov 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Nov 24, 2026 7:44am UTC

Request Review

@github-actions github-actions Bot added ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces labels Nov 24, 2026
@sunhaolin

Copy link
Copy Markdown
Collaborator Author

Seat record · 独立评审 · head 669758b4 · 2026-11-25

独立评审(只读子代理,未参与改动)结论:通过(有 nit)。Metadata-impact 同意 reviewer:公式字段只加 hidden: true,未删除或改名,不涉及权限、流程、种子数据。

  • 改了什么:crm_project_task.schedule_type 加 hidden: true,任务的记录页、抽屉、表单不再显示「排期类型」;字段与值不变,两个甘特图仍读它画里程碑。
  • 为什么改、谁提的:zh-CN:项目任务记录页显示甘特图辅助字段「排期类型:task」 #2769(本地 UI 测试发现):zh-CN 下显示英文机器值 task / milestone,且与「里程碑」复选框重复。
  • 最坏情况与能否回退:若某个甘特组件读不到隐藏字段,里程碑不再画成菱形;数据不受影响,撤一行即回退。
  • 评审没有验证的:项目详情页内嵌的甘特图(src/psa/pages/project_detail.page.ts:85)是否仍画菱形——PR 只实测了 Project Plan 视图的请求。

Findings

  1. src/psa/pages/project_detail.page.ts:85(低,本 PR):第二个甘特消费者未实测。
  2. test/psa-project-tasks.test.ts:158-161(nit,本 PR):测试只断言元数据标志,不证明页面不画该字段、也不证明甘特仍拿到值。
  3. 隐藏方式用字段级 hidden(先例 account.object.ts:176),不是不鼓励的 record:details / form.sections 逃生仓;无文档引用该字段。
  4. 与 fix(psa): a task moved out of Completed gives up its 100 % (#2768) #2771 三方合并模拟干净,无文本冲突。

@sunhaolin
sunhaolin added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 4ca2bf4 Nov 25, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd CI plumbing and the verification pipeline metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zh-CN:项目任务记录页显示甘特图辅助字段「排期类型:task」

1 participant