검토 가능한 인사이트에 가입 날짜와 게시글 수가 잘못 표시됩니다

재현 단계:

  1. Reviewable UI refresh를 최소한 관리자 그룹에 대해 활성화합니다.
  2. 꽤 오래전에 생성된 관리자 계정을 사용하며, 이 계정은 몇 개의 게시물을 가지고 있어야 합니다.
  3. 자신의 게시물 중 하나를 신고(Flag)합니다.
  4. 리뷰 가능한 항목(reviewable)의 인사이트 탭을 확인합니다.

기대 결과:
신뢰 수준(Trust level), 가입 날짜, 게시물 수가 올바르게 표시됩니다.

실제 결과:
신뢰 수준은 올바르지만, 가입 날짜가 오늘 날짜로 표시되고 게시물 수는 0으로 표시됩니다.

요청이 올바른 사용자(ID 29)에 대한 것으로 보이며, 응답으로 표시되는 데이터도 올바르게 보입니다.

3개의 좋아요

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

2개의 좋아요

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?

1개의 좋아요

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 Commits · discourse/discourse · GitHub. The repro on the weekend was a dev install because I wanted to ensure nothing had changed in the past 10 days)

2개의 좋아요

I can still reproduce this. The joined date in the user info is today and the post count is 0

안녕하세요 @Moin!

늦게 답변드려서 죄송합니다. 꽤 까다로운 문제였거든요.

사실상, 플래거(flower)가 대상 사용자와 동일할 때 직렬화기(serializer)가 해당 탭에 필요한 추가 정보를 건너뛰고 있었습니다. created_bytarget_created_by의 순서를 바꾸어 target_created_by가 먼저 직렬화되도록 강제하고, 인사이트 탭이 올바르게 채워지도록 수정했습니다.

이제 latest에서 사용 가능합니다. 기회가 되면 테스트해 보시고 알려주세요.

1개의 좋아요