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.

Comments

mglaman created an issue. See original summary.

mglaman’s picture

mglaman’s picture

mglaman’s picture

Assigned: Unassigned » mglaman

Working on this.

mglaman’s picture

Status: Active » Needs review
StatusFileSize
new113.4 KB
new101.04 KB
new9.59 KB

Example 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.

mglaman’s picture

Status: Needs review » Needs work

Sorting is not working using the format.

mglaman’s picture

Hm. Sort wasn't broken. I just had set the Sort to be granular by month, but changed my format to be by the day.

mglaman’s picture

Assigned: mglaman » Unassigned
Status: Needs work » Needs review
StatusFileSize
new10.11 KB

This will be it!

  • mglaman committed 2c67399 on 8.x-1.x
    Issue #2945569 by mglaman: Provide a Views plugin to simplify date...
mglaman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.