Skip to content

All four locales label this_quarter_forecasts "This Quarter", but the view is not scoped to the current quarter #730

Description

@yinlianghui

Found while rewriting the forecasting guide for #627 (I needed to name the list views in prose and could not, because the metadata label and the translated label disagree about what the view does). Out of scope for that docs PR — filed rather than fixed.

The problem

src/views/forecast.view.ts deliberately dropped the current-quarter restriction from this_quarter_forecasts, and renamed the view to say so:

this_quarter_forecasts: {
  name: 'this_quarter_forecasts',
  // Operator-only filter: the list data path resolves no date macro …
  label: 'Quarterly · Latest First',
  filter: [
    { field: 'period', operator: 'equals', value: 'quarter' },
  ],
  sort: [
    { field: 'period_start', order: 'desc' },
    { field: 'closed_amount', order: 'desc' },
  ],
}

The comment above it explains why: the list data path resolves no date macro, so a {current_quarter_start} filter would ship to the driver as a literal string and match nothing. Newest quarter sorts first instead. The tab that opens it is likewise labelled Quarterly.

The four locale bundles never followed:

  • src/translations/en.ts:323 — this_quarter_forecasts: { label: 'This Quarter' }
  • src/translations/zh-CN.ts:298 — 本季度
  • src/translations/es-ES.ts:327 — Este trimestre
  • src/translations/ja-JP.ts:356 — 今四半期

So the name a user actually reads promises a filter the view does not apply. Picking "This Quarter" returns every quarterly snapshot ever taken, for every settled quarter, with the current one merely sorted to the top. On a demo org that is four settled quarters plus whatever the nightly sweep has opened; on a real org it grows without bound. A reader who trusts the label and sums the Quota column gets exactly the cross-period addition that #614 fixed on the dashboard.

Not a duplicate of #494: that issue is about i18n key coverage and option keys that never apply. This key applies fine — it is the wording that is false.

Suggested fix

Bring the four translated labels in line with the metadata label (Quarterly · Latest First / 季度(最新在前)/ …), or, if "This Quarter" is the name the product wants, give the view a filter that actually delivers it — which per the code comment the list path cannot currently express, so the label is the honest thing to change.

Activity

  1. added
    bugSomething isn't working
    metadataDeclarative metadata — schema, security posture, UI surfaces
    pm:queueReady for the PM dispatch loop
    on Aug 5, 2026
  2. yinlianghui commented on Aug 5, 2026

    @yinlianghui
    CollaboratorAuthor

    分诊(PM 循环第 4 轮,会话 session_01VHrPAGEgFDoHjphqYG4BMa):入 pm:queue。

    方向预判(dev 接单时复核):「当前季度」限定是刻意去掉的(列表路径不解析日期宏 —— 平台限制),所以修法在标签侧:让四个语言包与视图 label 说实话(如「Quarterly Forecasts / 季度预测」),而不是把日期宏塞回过滤器(那是平台能力,不在本仓修)。若 dev 复核发现列表过滤器如今已支持日期宏,则反向修(恢复限定、保留标签)并说明。


    Generated by Claude Code

  3. added
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    pm:queueReady for the PM dispatch loop
    on Aug 5, 2026
  4. self-assigned this
    on Aug 5, 2026
  5. yinlianghui commented on Aug 5, 2026

    @yinlianghui
    CollaboratorAuthor

    认领:PM 循环(17.0 发布修复线)第 4 轮追派
    会话:session_01VHrPAGEgFDoHjphqYG4BMa
    分支:claude/issue-730-quarterly-view-label
    Worktree:hotcrm-issue-730
    文件面:src/views/forecast.view.ts(视图 label)、四个语言包(src/translations/*)中该视图的标签、相关测试、changeset。⛔ 不动 src/data/** 与 src/flows/**(#671 在飞)。

    方向按分诊评论:标签向行为对齐(「当前季度」限定是因列表路径不解析日期宏而刻意去掉的 —— 平台限制,不在本仓修);若复核发现过滤器如今支持日期宏则反向修并说明。


    Generated by Claude Code

  6. yinlianghui commented on Aug 5, 2026

    @yinlianghui
    CollaboratorAuthor

    验收 ACCEPT(PM 复核,对照 GitHub 实况):PR #745,8/9 绿(Playwright 收尾中),已转 ready 并挂自动合并。

    首先公开更正 PM 自己的分诊方向:我预判「标签侧修」,依据是 issue 所述「限定被刻意去掉(列表路径不解析日期宏)」—— dev 实测推翻了这个前提:该注释写于 16.1.0 时代(#515,7/29),而 filter-token 服务端解析在 17.0.0-rc.0 已进 ObjectQL 读路径(#3582),rc.2 上 {current_quarter_start} 实测解析正常。正确修法是恢复当季限定 ——四个语言包从头到尾没说谎,漂移的是 metadata label。dev 走的正是派发词预留的反向分支,这是前提优先纪律的教科书案例。

    复核要点:


    Generated by Claude Code

  7. added 3 commits that reference this issue on Aug 10, 2026
    9305252
    814dc37
    c036313
  8. added and removed on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmetadataDeclarative metadata — schema, security posture, UI surfacespm:dispatchedDispatched to a dev agent by /pm-dispatchpriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions