Wrong join date and post count in reviewable insights

Steps to reproduce:

  1. Enable Reviewable UI refresh at least for the admin group.
  2. Use an admin user that was created a while ago and has a few posts.
  3. Flag one of your posts.
  4. Check the insights tab on the reviewable.

Expected result:
Trust level, join date, and number of posts are correct.

Actual result:
Trust level is correct, join date is today’s date, and the post count is 0.

The request seems to be for the right user (ID 29) and the data that is shown as the response seems correct too.

2 לייקים

FYI @kris.kotlarek , looks like our date is off

לייק 1

Thank you for reporting this bug.

In terms of post count, it feels correct. To display this number, we are using data from the /reviewable/334.json request. Data from /admin/users/29.json request is only used for IP lookup.

The difference between those two requests is that the first one is using User.user_stat.post_count, which counts only public posts (excluding posts in private categories and PMs). The second - admin - request is returning all the posts (including those in private categories and PMs).

In my case, 32 is displayed, even if the admin’s post count is 36.


Is it possible that your users have 5 private messages or posts in restricted categories?


I am still investigating the incorrect joined date. Does refreshing the page help?

No, the posts were all in categories, just like the one I used for flagging. The number of posts was always 0 when the join date is wrong.

(I did the re-test on my site that is still on https://github.com/discourse/discourse/commits/0e0e716e0d. The repro on the weekend was a dev install because I wanted to ensure nothing had changed in the past 10 days)

2 לייקים