This needs to be done after #2945568: Ensure bundle plugin fields are available in fields.
The magic for the reports is to:
* Aggregate on a timestamp
* The timestamp needs to be converted from a Unix timestamp into a DateTime string
* The DateTime string needs to be parsed into a readable format
* Group on that format.
This is how we can do monthly, quarterly, weekly, daily, etc reporting.
In Drupal 7 this involved a lot of manual UI configuration. It would be great if this could be simplified into a simple custom field plugin for order reports.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 2945569-8.patch | 10.11 KB | mglaman |
| #5 | 2945569-5.patch | 9.59 KB | mglaman |
| #5 | Revenue_report__Order_report____Drush_Site-Install.png | 101.04 KB | mglaman |
| #5 | Revenue_report___Drush_Site-Install.png | 113.4 KB | mglaman |
Comments
Comment #2
mglamanComment #3
mglamanComment #4
mglamanWorking on this.
Comment #5
mglamanExample report which aggregates by day.
The created timestamp uses a custom field which forces SQL date format and fixes aggregation. Rows will be grouped by the format returned by the date format.
Comment #6
mglamanSorting is not working using the format.
Comment #7
mglamanHm. Sort wasn't broken. I just had set the Sort to be granular by month, but changed my format to be by the day.
Comment #8
mglamanThis will be it!
Comment #10
mglamanDocumenting this in https://www.drupal.org/docs/8/modules/commerce-reporting/creating-a-repo...