Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

plugin-gantt: auto-schedule ignores self-dated summaries & writes without confirming; export draws phantom group bars, no in-bar titles, opaque filenames; charts render in the viewer's time zone #2682

Closed

Description

@baozhoutao

Follow-up batch to #2676 / #2677, all reproduced live on the 4-level 排班计划 tree (project/product groups → self-dated summary plans → locked dispatch leaves).

1. Reschedule skips every parent task — and the toolbar wand writes without asking

computeProjectReschedule treats EVERY parent as a derived rollup (if (summaries.has(id)) continue), so under summaryExtent: 'self' a plan that has dispatch children is silently immune to auto-schedule and to the post-drag conflict cascade — the scheduling twin of the editability gap fixed in #2677. Also the toolbar auto-schedule button commits the bulk reschedule immediately, while the drag-conflict path already asks first ("Auto-reschedule N affected tasks?") — an in-component inconsistency for the more impactful action. And pushed starts don't snap to shift-band boundaries (班次边界), so a successor can be scheduled mid-band.

2. Export defects (导出内容异常 + 文件名)

  • PNG/PDF export draws a rollup bar for every parent row including pure grouping levels (type 'group' — 项目/产品) that the live chart renders bar-less → phantom full-span bars.
  • Bars export as bare color blocks: no in-bar titles (live chart shows 计划名 on summaries, executor on leaves).
  • Filenames are an opaque gantt-week.png — no business context, repeated exports overwrite each other.

3. Charts render in the viewer's browser time zone (班次错位)

All calendar math — shift bands, day columns, drag snapping, today line, date labels — uses the viewer's local zone. A plan starting 7/20 08:00 Beijing displays as "7/19 evening" in a UTC-7 browser, bands misalign, and drags land on misaligned instants. Business shifts are a wall-clock fact of one zone; the chart needs a project time zone (MS Project model).

Fix direction (PR follows)

  • computeProjectRescheduleDetailed: self-extent own-dates summaries shift like tasks and carry their unlocked subtree (group-drag semantics, 顺延-only max rule); locked violators reported as skipped; snapStart hook for band snapping; back-compat wrapper.
  • Toolbar wand: compute → confirm dialog ("shift N task(s)? M locked skipped") → apply; transient notice when clean.
  • Export: skip group rows, draw ellipsis-truncated in-bar titles (CJK-aware width), filenames <gantt.exportFileName|object label|API name>-<yyyyMMdd-HHmm>.<ext>.
  • New gantt.timeZone (IANA): shifted-clock shim renders the configured zone's wall time for every viewer; writes translate back to real instants; DST-safe; omitted = unchanged.

Activity

  1. self-assigned this
    on Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions