Bug: Saved reports lose their custom event selection after reload
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 82/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- analytics, backend-api-design
Piste de recherche
Lisez transformReportEventItem() dans packages/core/src/modules/report/report.service.ts et suivez la façon dont cette fonction reconstruit les séries d’événements pour les lectures du tableau de bord et de l’éditeur. Préservez customEventId dans le résultat relu, puis ajoutez des tests de régression pour les séries d’événements personnalisées et régulières. Le travail est terminé lorsque l’identifiant de l’événement personnalisé est conservé après relecture et que les séries d’événements régulières fonctionnent toujours.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 7.3k
- Forks
- 552
- Merge moyen
- 1 j 2 h
- PR mergées (30 j)
- 18
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de Openpanel-dev/openpanel
-
Free trial banner overlaps the AI Chat sidebarPeut-être pris @VasuS609 l’a pris il y a 2 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
Openpanel-dev/openpanel#690 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Openpanel-dev/openpanel#653 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
Openpanel-dev/openpanel#610 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Updating OP without data lossOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
Openpanel-dev/openpanel#682 ·
Les mainteneurs répondent en général sous 1 jour
-
Save button becomes inaccessible when dashboard names are longPeut-être pris @aftab8052tech l’a pris il y a 11 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 40/100
Openpanel-dev/openpanel#679 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de Openpanel-dev/openpanel
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
tashfeenahmed/freellmapi#2217 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
remotion-dev/skills#37 ·
-
gui: a narrow window's gateway key row with a line under it wraps its faded badges onto blank linesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
-
Slider: Escape during a thumb drag keeps and commits the dragged value, unlike ui-sdk's other dragsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
vercel-labs/ui#1758 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
nicobailon/pi-subagents#3425 ·
Les mainteneurs répondent en général sous 1 jour