@atom-box opened this Issue on April 19th 2022

A user suggests the following:

Is there a way to fix the filenames for emailed PDF reports? Matomo defaults to the file name of (for example) "Report abc Website - March 18 - April 16, 2022.pdf" but this makes it impossible to list reports chronologically when they are in alphabetical order.

If archiving PDF reports from Matomo, the problem is severe enough that I would classify it as a bug.

Matomo should be using international ISO 8601 dates by default, i.e. "Report for abc Website - 2022-03-18 to 2022-04-16.pdf". Using "Year-Month-Day" allows sorting the archived PDF files chronologically in alphabetical order. The ability to generate custom report titles (such as "Report for abc Website" instead of "Report abc Website") is a much-needed feature for Matomo.

@bx80 commented on April 22nd 2022 Contributor

Currently the same report description is used both for the email subject and the filename.

The report filename is generated in https://github.com/matomo-org/matomo/blob/daef8036293985885dc838faeb1457d7287cdc10/plugins/ScheduledReports/GeneratedReport.php#L103

We could add a config option to choose the date format to use for the report filename, possibly defaulting to ISO 8601.
Scheduled reports already have a custom description which should be appended after the 'Report' prefix, a description of 'for abc Website' should result in 'Report for abc Website'

Powered by GitHub Issue Mirror