@bx80 opened this Pull Request on May 31st 2022 Contributor

Description:

Fixes #19263

The overall conversion rate was not being formatted on goal reports for some datatable types due to a non-object processed metric set in Goals.Get

This can be seen on the Funnels plugin FunnelsReport_goalreport_without_funnel.png UI test (./console tests:run-ui FunnelsReport)

Review

@sgiehl commented on May 31st 2022 Member

@bx80 I've updated the PR and applied some changes. Setting the metric class as processed metric actually broke the API.get report. I think the problem is, that the conversion rate actually isn't really a processed metric for the Goals.get report. It's the processed metric of Goals.getMetrics, which is used by Goals.get to gather the metrics. Anyway, having it as processed metric caused a double formatting, which failed. You can see that in the test failures.
I have now instead added the metric class as processed metric to the datatable metadata for sparklines only. This fixes the formatting issue for sparklines as well.
But at some point we need to clean up all that metric stuff, so it's clear what is happening where. It took me really long to narrow down the issue...

@bx80 commented on June 1st 2022 Contributor

Thanks @sgiehl :+1: Totally agree that metrics need to be tidied up at some point and the differences between a real processed metric and a metric class used for formatting documented, it gets confusing very quickly!

This Pull Request was closed on May 31st 2022
Powered by GitHub Issue Mirror