[ANALYTICS-289] JsonDataTransformer should filter ignore incompatible data Created: 13/Jan/21  Updated: 01/Mar/21  Resolved: 03/Feb/21

Status: Closed
Project: Analytics
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Yen Lac Tue Assignee: Yen Lac Tue
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 3d 7h 52m
Original Estimate: Not Specified

Attachments: PNG File dummyABTesting.png     File dummyMatomoDataSupplier.yaml     File dummy_matomo.json     Text File jsontransform_error-1.txt    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Epic Link: UI/UX Dash improvements
Sprint: Add-Ons 56
Story Points: 5

 Description   

Steps to reproduce

  1.  Please use the dummy-matomo.json and dummyMatomoDataSupplier.yaml attached in your light module
  2.  Build custom widget -> select dummy data
  3. Dimension: metadata.documentation
  4. Metric: reportData.nb_actions

OR you can choose these options from Dummy ABTesting

.. Logs, screenshots, gifs...

Expected results

  1. Preferred option --> remove invalid option from combobox.
  1. Fallback option --> Show error notification message for user

Actual results

Console throw exception

2021-01-13 13:39:31,919 ERROR gnolia.analytics.amcharts.vaadin.AmChartsComponent: There is an error while fetching chart component data.2021-01-13 13:39:31,919 ERROR gnolia.analytics.amcharts.vaadin.AmChartsComponent: There is an error while fetching chart component data.java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List at info.magnolia.analytics.amcharts.data.JsonDataTransformer.transformToDataFieldsValues(JsonDataTransformer.java:92) ~[magnolia-analytics-amcharts-1.2-SNAPSHOT.jar:?] at info.magnolia.analytics.amcharts.data.JsonDataTransformer.transformData(JsonDataTransformer.java:74) ~[magnolia-analytics-amcharts-1.2-SNAPSHOT.jar:?] at info.magnolia.analytics.amcharts.vaadin.AmChartsComponent.fetchAndSetData(AmChartsComponent.java:193) 

Workaround

Development notes

  • Propose config to ignore incompatible data.

Generated at Sun Feb 11 23:17:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.