Bug: Saved reports lose their custom event selection after reload
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 82/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
阅读 packages/core/src/modules/report/report.service.ts 中的 transformReportEventItem(),并追踪它如何为 dashboard 和 editor 的读取重建事件序列。在读回结果中保留 customEventId,然后为自定义和常规事件序列添加回归测试。自定义事件 ID 在读回后仍然保留且常规事件序列仍能正常工作时,即为完成。
由索引模型根据 Issue 内容生成。
描述
Summary
A line chart using a saved custom event shows data in Report Builder. After the report is saved to a dashboard and reopened, it can show No data. The event picker still lists the custom event, but the selected row is a second entry with the same name labeled Not tracked yet.
The save path preserves customEventId in the report's event series. The shared report readback function drops it when rebuilding the series. The chart then queries for a raw event with the custom event's display name.
Version checked
- Repository:
Openpanel-dev/openpanel - Affected version:
v3.28.0(ae97a52bf5dd4516178a262573734931500d2544) - Also checked:
mainat21e87d3388b51e7fc8cd6e219709ab2162f2ae60has the same omission in the readback function. - Verification: the UI behavior was observed in a self-hosted deployment based on
v3.28.0. The write-payload, readback, and event-matching helpers from the upstream tag were exercised locally in memory with synthetic data. A full browser/API/database test on a clean upstream instance remains unverified.
Steps to reproduce
- In a test project, track
checkout_startedandcheckout_resumed. UseCheckout activityonly as the name of a custom event. - Under Project settings → Events, create the custom event
Checkout activityfrom those two tracked events. - In Report Builder, create a line chart with a fixed time range that contains both events. Pick
Checkout activityfrom the row labeled Custom event and confirm that the preview shows data. - Save the report to a dashboard. Reload the dashboard and reopen the saved report. Keep the same time range and filters for the comparison.
- Open the event picker and check which
Checkout activityrow is selected.
Expected behavior
The saved report still selects the Custom event row and shows the same results for the same time range and filters. The query continues to use the custom event's current definition.
Actual behavior
The chart shows No data. The picker contains both Checkout activity entries. The one labeled Not tracked yet is selected.
In the synthetic check, the write payload contained customEventId: "custom-1". The readback kept name: "Checkout activity" and omitted the ID. The query helpers resolved checkout_started and checkout_resumed before save, and only Checkout activity after readback. Saving edits to the reloaded report can also overwrite the stored reference because Update replaces the event series with the submitted series.
Relevant source
- The picker records the custom event's name and ID. ReportSeries.tsx
- The API writes the submitted series to
Report.events. reportWriteData - Both the dashboard list and the report editor use the same readback conversion. The event branch copies the name and omits
customEventId. transformReportEventItem · list and detail reads - Query-time expansion looks up the definition by ID. Without the ID or an expanded member list, matching falls back to the series name. expandCustomEvents · eventMatchCondition
Suggested fix and regression coverage
Preserve the optional customEventId in transformReportEventItem() and keep resolving the custom event's current definition at query time.
Add a regression test for reading back a saved event series with customEventId and a regular event series without it. In the UI, save and reopen a custom-event report, change only its title, save again, and verify that the selection and chart results still match.
- 主要语言
- TypeScript
- 星标
- 7.3k
- 派生
- 552
- 平均合并
- 1 天 2 小时
- 30 天内合并 PR
- 18
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Openpanel-dev/openpanel 的其他 Issue
-
Free trial banner overlaps the AI Chat sidebar可能已有人在做 @VasuS609 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 64/100
Openpanel-dev/openpanel#690 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
Openpanel-dev/openpanel#653 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
Openpanel-dev/openpanel#610 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
Openpanel-dev/openpanel#682 ·
维护者通常 1 天内回复
-
Save button becomes inaccessible when dashboard names are long可能已有人在做 @aftab8052tech 于 11 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 40/100
Openpanel-dev/openpanel#679 · 1 个 reaction ·
维护者通常 1 天内回复
查看 Openpanel-dev/openpanel 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
nicobailon/pi-subagents#3425 ·
维护者通常 1 天内回复
-
[PORT] A2A: map audio file parts to audio content and ignore MIME parameters (TS→Py)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭area-a2a bug port python
难度 2/5 1-3 小时 新手友好度 68/100
strands-agents/harness-sdk#6697 · 1 条评论 ·
维护者通常 1 天内回复
-
api technical-debt
难度 2/5 1-3 小时 新手友好度 66/100
opencollective/opencollective#9235 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
openwatersio/slackwater#603 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复