Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report information: "Report generated" without time unit (seconds?) #17567

Closed
math-GH opened this issue May 16, 2021 · 2 comments · Fixed by #17588
Closed

report information: "Report generated" without time unit (seconds?) #17567

math-GH opened this issue May 16, 2021 · 2 comments · Fixed by #17588
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Milestone

Comments

@math-GH
Copy link

math-GH commented May 16, 2021

grafik
link: https://demo.matomo.cloud/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday#?idSite=1&period=day&date=yesterday&segment=&category=General_Visitors&subcategory=VisitTime_SubmenuTimes

Expected Behavior

Information, when the report was generated

Current Behavior

time unit missed (seconds, minutes, hours, days?)

Possible Solution

time unit added

Steps to Reproduce (for Bugs)

see above

Your Environment

  • Matomo Version: 4.2.1 (demo.matomo.cloud)
  • Browser: Firefox
  • Operating System: Windows 10
@math-GH math-GH added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label May 16, 2021
@Findus23
Copy link
Member

I'm not entirely sure why, but $this->metricsFormatter is a Piwik\Plugins\CoreVisualizations\Metrics\Formatter\Numeric here

if ($date->getTimestamp() > $today) {
$elapsedSeconds = time() - $date->getTimestamp();
$timeAgo = $this->metricsFormatter->getPrettyTimeFromSeconds($elapsedSeconds);
return Piwik::translate('CoreHome_ReportGeneratedXAgo', $timeAgo);
}

which returns the number as-is instead of creating a proper text.

@Findus23 Findus23 added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels May 16, 2021
@tsteur tsteur added the Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. label May 16, 2021
@tsteur tsteur added this to the 4.3.0 milestone May 16, 2021
@flamisz flamisz self-assigned this May 18, 2021
@flamisz
Copy link
Contributor

flamisz commented May 19, 2021

Some tables (like Graph) are overwriting the text-formatter:

$this->metricsFormatter = new Numeric();

I made a fix to use HTML-formatter when we format when a report was last updated.

@sgiehl sgiehl modified the milestones: 4.3.0, 4.3.1 May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants