Skip to content

service/cases 详情布局 :130 说页眉有「SLA 倒计时」和状态/优先级徽章,与 #903 已在 sla 页写实的「没有倒计时、页眉只有编号+主题+账户」直接打架;:68 的首次响应触发条件也不对 #941

Description

@yinlianghui

来源:#925 / #926 / PR #939 实施过程的顺带发现(改同页 :59 / :70 / :71 / :111 / :114-121 / :166-173 时,回 case_detail.page.ts 与 global.actions.ts 核对同页其余的 SLA / 自动化说法)。基线 origin/main = 4855d50b,行号为 fresh main 上 PR #939 之前的行号,三语同址。

一、:130 页眉 —— 与兄弟页当面矛盾

- **Header** — case number, subject, status badge, priority badge, SLA countdown.

zh 同款:cases.zh-Hans.mdx:130「页眉——工单编号、主题、状态徽章、优先级徽章、SLA 倒计时。」

src/pages/case_detail.page.ts 的 header 区域有两个组件,页面把它们合并成了一个,还多算了一样东西:

页面主张 实况
页眉含工单编号、主题 ✅ page:header 的 title: '{case_number} · {subject}'(:47)
页眉含状态徽章、优先级徽章 ❌ 不在页眉。page:header 的 subtitle 是 {crm_account},此外只有图标、面包屑和三个动作按钮。status / priority 在下面那个 record:highlights(Key Information 条,:57-73)里,与 sla_due_date / is_sla_violated / owner_id / crm_account 并列,是普通字段不是徽章
页眉含 SLA 倒计时 ❌ 不存在。全仓没有任何倒计时/剩余时间的计算或渲染

最后一条不是新发现,而是同一件事已经在兄弟页写实过了:service/sla-and-escalation.mdx:38(#903 / PR #918 落地)写着

There is no live SLA countdown. Nothing in this app computes time remaining or time over — no threshold colouring, no warning zone, and no ⏱ / ⚠️ / 🚨 treatment anywhere on the case. The page header carries the case number, subject and account and nothing else; SLA Due Date and SLA Violated are rendered as two ordinary fields in the Key Information strip below it.

于是 service 目录下两页现在对同一个页眉给出相反的描述,且更靠前被读到的是错的那页。这与 #928 里 setup 页与 sla 页打架是同一模式。

(同段 :131 的「Status path」经核属实,不要顺手删:case_detail.page.ts:76-92 确有 type: 'record:path',六个 stage 与页面列的 New → In Progress → Waiting on Customer → Escalated → Resolved → Closed 逐字一致。)

二、:68 首次响应时间的触发条件

- **First response time** — stamped the first time an agent comments or replies.

zh 同款::68「首次响应时间——客服第一次评论或回复时标记。」

first_response_date 的唯一写入方是 src/actions/global.actions.ts:386-401(logActivityAction),条件是:

if (OBJECT_NAME === 'crm_case' && recordId && EVENT_STATUS === 'held') { ... }

即记录一次已发生(held)的通话或会议时才写,且只写第一次(先读库里的值,非空则跳过)。这一处的设计理由写在紧邻的注释里,是刻意的:状态变更不算响应(客服可以把工单转到 in progress 然后自己查一小时,客户什么都没听到),仅仅预约了会议也不算。

所以「评论或回复」两个动作都不会打这个戳:评论走的是 feeds,邮件走 sys_email,两条路径都不碰 first_response_date。注释里还明写了一条约定 —— "any future customer-facing path on a case MUST stamp this too, or the metric silently under-reports" —— 恰恰说明现在只有这一条路径。

读者据 :68 会以为回一封邮件就把首次响应时间定住了,实际那个字段还是空的。

为什么要紧

:130 是详情页布局的「按图索骥」描述,读者打开工单去找一个倒计时,找不到之后合理地怀疑是自己权限或版本问题 —— 而正确答案(本应用根本不算剩余时间)就写在隔壁页上。:68 让人以为一个指标已经被自动填好,实际它只在很窄的一条路径上被填。

边界

Refs #903 #925 #926 #936 #939

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationpm:dispatchedDispatched to a dev agent by /pm-dispatch

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions