Report "Total for period" shows wrong value



In the new report screens you can sort by end and start date. However, the “Total for period” is wrong.

See screenshot:

As you can see, I have only two posts today but the “Total for period” is 178.

(Edit: It’s the same for topics)

(Joffrey Jaffeux) #2

Indeed something is off, I’m currently fully reworking this part ATM anyways so it should be fixed soon.


Alright. I’m currently working on a website which has to display my Discourse’s total posts for all time and daily. I was surprised to see such a huge number for “daily”.

Can I assume that “Total” will end up the correct number?

If so, I’ll comment the code where I call “Total” and only addition all the data until that fix.

(Joffrey Jaffeux) #5

Yes total should me more correct, at least it’s not computed the same way, so it shouldn’t be affected by the total for period bug.

(Joffrey Jaffeux) #6

I can’t reproduce this error on my instance so far, will try more tomorrow so I can be sure it’s not brought in next iteration.


Installed version: v2.1.0.beta2 +2

My Discourse had data reimported from previous backups a few time. Otherwise, it’s pretty much vanilla.


It’s also pretty strange that it displays 178. This number is out of nowhere. Could it count deleted messages or something?

This is my about.json

    "stats": {
        "topic_count": 122,
        "post_count": 354,

And this is my totals according to the reports

/admin/reports/posts Total for period 178
/admin/reports/topics Total for period 122