easy-digital-downloads icon indicating copy to clipboard operation
easy-digital-downloads copied to clipboard

EDD 3.0 Reports - "Relative" arrows and percentages incorrect

Open mgibbs189 opened this issue 2 years ago • 1 comments

Bug Report

Expected behavior

On the Reports page, the "Relative" arrows (and percentages) should correctly compare the current time slice with the previous time slice.

If This Month is set and it's August 3rd, then the "Relative" stats should compare the first 3 days of August with the first 3 days of July.

Actual behavior

Currently it's comparing all of August (i.e. the first 3 days) with all of July. So at the beginning of a month, the stats are always down by 90%, skewing the stats.

Steps to reproduce the behavior

  1. Browse to the Reports page
  2. See the "Relative" arrows / percentages below each statistic

Information (if a specific version is affected):

PHP Version: 8.1

EDD Version (or branch): 3.0.2.1

WordPress Version: 6.0.1

mgibbs189 avatar Aug 03 '22 14:08 mgibbs189

@mgibbs189 This is something we're looking to improve, to make "This Month" a 'up until date' graph.

cklosowski avatar Aug 04 '22 16:08 cklosowski

I've updated the title to more accurately reflect what the issue is, in that the relative query is not accounting for a partially completed period, meaning:

This month (when only 10 days into the month) is making the relative query against 'last month' which is completed.

cklosowski avatar Aug 16 '22 16:08 cklosowski