Date range issue for Posts and New Topics report

AI-generated summary

A discrepancy was reported in the admin panel’s Posts and New Topics report, where the Table and Graph views include an extra date (April 1) beyond the selected range (ending March 31), while the CSV export correctly ends on March 31. This issue was confirmed by BenLeong, who noted that the extra day always shows zero posts, even when data exists. sam directed the issue to the team, and techAPJ confirmed it was fixed via this commit.

There seem to be a few differences between the data that’s displayed via the Graph and Table views for the admin panel reports, and the version available for export via CSV.

This example is from the Table view of /admin/reports/posts, which seems to be including the date immediately after the selected range (April 1st, instead of ending on March 31).

The Graph view of that page shows the same range, also ending with “zero posts” on April 1.

However, the data export for this range doesn’t include the additional date, ending on Mar 31, with a value of zero for that day:
12%20am

It’s also worth noting that the last day in the range (both the “extra” day in the Admin/Reports view, and the actual last day from the CSV export) always seems to show zero posts/topics. Selecting a broader range shows that there actually were posts made on that day, though:

@neil & @travis - this is the issue we discussed earlier today.

5 Likes

@techAPJ can you add this to your list to have a look?

5 Likes

Fixed via:

https://github.com/discourse/discourse/commit/f5febe5843add8ae536d103158b8e61150eb8dd8

Thanks for bringing this to our notice @BenLeong. :+1:

6 Likes