Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ See the [Excel v3.0 contract](docs/PUBLIC.md#excel-v30-controlled-exchange) for

Use **Import** to read a Microsoft Project XML (`.xml`) file, preview the mapped fields and create an independent project. Use **Data & versions → Export Project XML** to download a new file; source files are never overwritten. Native `.mpp` requires conversion to XML in Microsoft Project first.

The limited mapping supports three task levels, calendar dates, positive whole elapsed-day durations, single FS links, signed whole-day Lag, integer progress, priorities and ten custom groups. Group assignments use Text1–Text10; retain project/task exchange notes for configuration and inactive Lag. Unsupported hierarchy, working calendars, milestones, date constraints, multi-predecessor/non-FS links and schedule conflicts are rejected. Other Project data is not retained. Native Project open/save compatibility still needs desktop acceptance. See the [Project XML contract](docs/PUBLIC.md#project-xml-exchange).
The limited mapping supports three task levels, calendar dates, positive whole elapsed-day durations, single FS links, signed whole-day Lag, integer progress, priorities and ten custom groups. Group assignments use Text1–Text10; retain project/task exchange notes for configuration and inactive Lag. Files that use working time, times of day, milestones, date constraints, task calendars or leveling delays are converted to calendar days: the file's start and finish dates are kept, durations and Lag become calendar days (weekends and holidays count), and every converted task is listed in the preview. Unsupported hierarchy, multi-predecessor/non-FS links and finish-scheduled projects are still rejected. Other Project data is not retained. Native Project open/save compatibility still needs desktop acceptance. See the [Project XML contract](docs/PUBLIC.md#project-xml-exchange).

### Development and validation

Expand All @@ -66,7 +66,7 @@ Development checks require Node.js 22+ and Python 3 (standard-library XML parsin

```sh
npm run build # regenerate src/index.html from src/app/
npm test # build freshness check + 86 logic checks (Node.js + Python 3)
npm test # build freshness check + 87 logic checks (Node.js + Python 3)
npm run test:e2e # browser smoke test; needs: npm install --no-save playwright && npx playwright install chromium
npm run format # optional: Prettier formatting for sources and tests
npm run privacy
Expand Down Expand Up @@ -108,7 +108,7 @@ Excel 数据表和 Instructions 固定为英文、Arial 9 号;新增 Instructi

## Project XML 导入与导出

在“导入”中选择 XML,预览后创建独立项目;通过“数据与版本 → 导出 Project XML”另存当前字段。源文件只读;不直接读写 MPP。支持三级结构、整自然日、单一 FS 前置、Lag、进度、优先级及 10 个组,不支持的排程规则会拒绝,不静默转换。Microsoft Project 桌面打开/另存仍待实测。详见 [Project XML 交换规范](docs/PUBLIC.md#project-xml-交换)。
在“导入”中选择 XML,预览后创建独立项目;通过“数据与版本 → 导出 Project XML”另存当前字段。源文件只读;不直接读写 MPP。支持三级结构、单一 FS 前置、Lag、进度、优先级及 10 个组。使用工作日历、时刻、里程碑、日期约束、任务日历或资源平衡延迟的文件统一换算为日历日:保留文件中的开始/完成日期,工期和 Lag 按日历日计(含周末和节假日),预览逐条列出换算。不支持的层级、非 FS/多前置和按完成日期排程的项目仍拒绝。Microsoft Project 桌面打开/另存仍待实测。详见 [Project XML 交换规范](docs/PUBLIC.md#project-xml-交换)。

## 开发与验证

Expand All @@ -118,7 +118,7 @@ Excel 数据表和 Instructions 固定为英文、Arial 9 号;新增 Instructi

```sh
npm run build # 由 src/app/ 重新生成 src/index.html
npm test # 构建一致性检查 + 86 项逻辑检查(Node.js + Python 3)
npm test # 构建一致性检查 + 87 项逻辑检查(Node.js + Python 3)
npm run test:e2e # 浏览器冒烟测试;需先 npm install --no-save playwright && npx playwright install chromium
npm run privacy
npm run release
Expand Down
9 changes: 5 additions & 4 deletions docs/PUBLIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Gantt bars remain keyboard-focusable: arrow keys move by one calendar day, Shift

### Validation and release acceptance

Use Node.js 22+ and Python 3 for logic checks (the browser app has no runtime dependencies). The current baseline has 86 logic checks and a 26-check browser smoke suite; record the actual counts and results for each change rather than treating these numbers as fixed requirements.
Use Node.js 22+ and Python 3 for logic checks (the browser app has no runtime dependencies). The current baseline has 87 logic checks and a 27-check browser smoke suite; record the actual counts and results for each change rather than treating these numbers as fixed requirements.

| Gate | Command and acceptance |
| --- | --- |
Expand Down Expand Up @@ -120,7 +120,8 @@ Microsoft Project XML (MSPDI) is supported for current fields only. Import previ
- Dates use midnight whole-day boundaries; Finish is exclusive (the midnight after the web finish date). Duration encodes 24 hours per calendar day with DurationFormat=8. Only one local FS predecessor is allowed; LinkLag is signed calendar days × 14400 (tenths of minutes), with LagFormat=8.
- PercentComplete is an integer 0–100. Priorities High/Medium/Normal export as 900/500/100. Other input values map by >500/=500/<500, with a preview notice.
- Text1–Text10 field IDs explicitly map group1–group10. UID 0 summary Notes carry the ProjectWorkspaceMSPDI v1 mapping and group names/colors/slots. Task exchange notes preserve inactive Lag without a predecessor. Keep these notes and field definitions. Standard resource assignment names from external files map to Group 1, explicitly disclosed in the preview; work/capacity is not imported.
- Limits: 2 MB UTF-8, 2000 tasks, 255 characters per project/task name or per group assignment field. Invalid XML, DTDs, duplicate/missing references, working-duration calendars, partial days, milestones, date constraints, task calendars, leveling delays, non-FS/multiple predecessors and inconsistent schedules reject before saving. Summary values are recalculated and previewed.
- Limits: 2 MB UTF-8, 2000 tasks, 255 characters per project/task name or per group assignment field. Invalid XML, DTDs, duplicate/missing references, non-FS/multiple predecessors, finish-scheduled projects and inconsistent schedules reject before saving.
- Calendar-day conversion: working calendars are disrupted by irregular holidays, so the tool schedules in calendar days only. Sub-tasks with working-time durations, times of day, milestones, date constraints, task calendars or leveling delays keep the file's start and finish dates; duration becomes the inclusive calendar-day span, a milestone becomes a 1-day task, and the Lag of a converted link is derived from the dates (start − predecessor finish − 1). Each conversion is listed in the preview with the original and converted values. Files exported by this tool import exactly, without conversion. Summary values are recalculated and previewed.
- Only current fields are exchanged. Original notes, costs, work, capacity, other custom fields, versions, audit and recovery points are not preserved. Unknown dates/durations remain absent, but Project may fill them on opening.

Implementation follows Microsoft's [Project XML reference](https://learn.microsoft.com/en-us/office-project/xml-data-interchange/project-xml-data-interchange-schema-reference), [elapsed duration units](https://learn.microsoft.com/en-us/office-project/xml-data-interchange/durationformat-element), [LinkLag units](https://learn.microsoft.com/en-us/office-project/xml-data-interchange/linklag-element) and [custom field IDs](https://learn.microsoft.com/en-us/office/vba/api/project.pjcustomfield). Real XML roundtrip checks and mapped-field schema-subset checks are separate from native Project desktop acceptance, which is still pending.
Expand Down Expand Up @@ -174,7 +175,7 @@ Implementation follows Microsoft's [Project XML reference](https://learn.microso

## 验证与发布验收规范

逻辑检查使用 Node.js 22+ 和 Python 3,网页无运行依赖。目前基线为 86 项逻辑检查和 26 项浏览器冒烟检查;每次记录实际执行的数量和结果,不将数量固定为验收条件。
逻辑检查使用 Node.js 22+ 和 Python 3,网页无运行依赖。目前基线为 87 项逻辑检查和 27 项浏览器冒烟检查;每次记录实际执行的数量和结果,不将数量固定为验收条件。

| 检查 | 命令与验收要求 |
| --- | --- |
Expand Down Expand Up @@ -243,7 +244,7 @@ v1.0 无项目身份和源版本摘要,只允许明确选择目标后更新既

支持阶段→主任务→子任务的三级树,任务按层级顺序排列,不根据 WBS 字符串猜父级。需要唯一 WBS 和 UID。最多 2000 条任务、2 MB XML;名称和单个组人员字段最多 255 字符,超限拒绝导出,不截断。未定日期、工期、优先级可留空,但 Project 桌面程序可能自动补值,重新导入前应核对。

工期必须为正整数经过自然日,子任务开始和完成时刻必须为午夜。拒绝工作日历工期、非整日、里程碑、非 FS 或多前置、跨项目依赖、日期约束、任务日历、资源平衡延迟、循环/缺失引用、超过三级或不足三级的任务树,以及源日期与本工具排程冲突。汇总日期、进度和状态按本工具规则重算并在预览展示。外部标准资源分配名称映射到 Group 1,预览明确提示;这不表示导入工时、资源容量或费用。原备注、成本、工时、其他自定义字段和未支持功能不保留。
本工具只按日历日排程(工作日历会因不规则节假日被打乱)。使用工作日历工期、非午夜时刻、里程碑、日期约束、任务日历或资源平衡延迟的子任务换算为日历日:保留文件中的开始和完成日期,工期取两者之间的日历天数(含首尾),里程碑转为 1 天任务,相关链接的 Lag 由日期推算(开始 − 前置完成 − 1);预览逐条列出原值和换算值。本工具导出的文件原样导入,不做换算。拒绝非 FS 或多前置、跨项目依赖、按完成日期排程、循环/缺失引用、超过三级或不足三级的任务树,以及源日期与本工具排程冲突。汇总日期、进度和状态按本工具规则重算并在预览展示。外部标准资源分配名称映射到 Group 1,预览明确提示;这不表示导入工时、资源容量或费用。原备注、成本、工时、其他自定义字段和未支持功能不保留。

未设置前置时仍填写的 Lag 通过任务备注中的 v1 扩展保留,避免丢失暂未生效的输入值。应保留本工具导出的项目/任务交换备注和组字段定义,否则组配置无法完整恢复。不自动猜测其他来源 Text 字段的业务含义。XML 先检查大小、禁止 DTD/实体声明,再用 XML 解析器读取,校验候选数据后复用预览与原子保存;失败和取消不修改现有项目。

Expand Down
16 changes: 14 additions & 2 deletions docs/STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ Updated: 2026-10-27 (Asia/Shanghai).
- Controlled Excel v3, protected calculated cells, explicit 21/22-field mappings, group configuration, preview, source revision checks and downloads as new files. Legacy 14-column spreadsheet import remains positionally compatible; source-specific aliases have been removed. Legacy JSON requires a declared three-slot mapping.
- Public source allowlist and irreversible identifier fingerprints with submission/push hooks. Historical source files, old templates, development images, raw audit records and old Git backups have been removed under explicit user authorization. The public repository was deleted and recreated under the same name, with a new repository identity and clean Git history; only the 13 reviewed files were uploaded.

## Current change: Project XML import preview
## Current change: Project XML calendar-day conversion

- Working calendars are disrupted by irregular holidays, so imports now convert instead of rejecting. Sub-tasks with working-time durations, times of day, milestones, date constraints, task calendars or leveling delays keep the file's start and finish dates; duration becomes the inclusive calendar-day span, milestones become 1-day tasks, and Lag on converted links is derived from the dates. Each conversion is a preview row ("Converted to calendar days") with original and converted values, plus a notice. Own exports import exactly, without conversion.
- Still rejected: non-FS/multiple predecessors, finish-scheduled projects, hierarchy outside three levels and malformed files.
- Tests: 87 logic checks (20 Project XML, including a fictional working-calendar file and an own-export no-conversion check) and a 27-check browser smoke test with a working-time import.

## Previous change: Project XML import preview

- The preview listed every exported field of every task, with dates as Excel serial numbers and progress as fractions (for example 46322 and 0.19). It now shows one "New" row per task, like Excel creation templates, plus summary values the schedule recalculated differently from the file, shown as YYYY-MM-DD dates and percentages.
- Tests: 86 logic checks (2 new Project XML preview checks) and a 26-check browser smoke test with a new Project XML export → import → preview → apply round trip.
Expand Down Expand Up @@ -90,7 +96,13 @@ Updated: 2026-10-27 (Asia/Shanghai).

更新:2026-10-27(Asia/Shanghai)。

### 本次变更:Project XML 导入预览
### 本次变更:Project XML 换算为日历日

- 工作日历会因不规则节假日被打乱,导入改为换算而不是拒绝。使用工作日历工期、非午夜时刻、里程碑、日期约束、任务日历或资源平衡延迟的子任务保留文件中的开始/完成日期,工期取日历天数(含首尾),里程碑转为 1 天任务,相关链接的 Lag 由日期推算。每项换算在预览中单列一行(“换算为日历日”),显示原值和换算值,并附提示。本工具导出的文件原样导入。
- 仍拒绝:非 FS/多前置、按完成日期排程、非三级结构和格式错误的文件。
- 测试:87 项逻辑检查(Project XML 20 项,含虚构工作日历文件和自导出不换算检查),浏览器冒烟测试 27 项,新增工作日历文件导入检查。

### 上次变更:Project XML 导入预览

- 预览原先列出每个任务的全部字段,日期显示为 Excel 序列号、进度显示为小数(如 46322、0.19)。现改为每个任务一行“新增”,与 Excel 创建模板一致;另列出排程重算后与文件不同的汇总值,日期为 YYYY-MM-DD,进度为百分比。
- 测试:86 项逻辑检查(新增 2 项预览检查),浏览器冒烟测试 26 项,新增 Project XML 导出 → 导入 → 预览 → 应用往返检查。
Expand Down
Loading
Loading