대시보드 새 게시글 통계 오류

네, 감사합니다. 도움이 되었고, 프론트엔드에 오류가 있는 것이 아니라 데이터 자체가 없다는 점을 알려주셨네요 :thinking:

이 리포트를 뒷받침하는 SQL 쿼리는 비교적 간단합니다. Data Explorer나 데이터베이스에 직접 접근할 수 있다면 이 쿼리를 실행하고 조정해 보신 후 데이터가 반환되는지 확인해 보실 수 있습니다:

SELECT 
  COUNT(*) AS "count_all", 
  date(posts.created_at) AS "date_posts_created_at" 
FROM 
  "posts" 
  INNER JOIN "topics" ON "topics"."deleted_at" IS NULL 
  AND "topics"."id" = "posts"."topic_id" 
WHERE 
  "posts"."deleted_at" IS NULL 
  AND (
    topics.archetype <> 'private_message'
  ) 
  AND (
    posts.created_at >= '2025-02-01' 
    AND posts.created_at <= '2025-02-28'
  ) 
  AND "posts"."post_type" = 1 
GROUP BY 
  date(posts.created_at) 
ORDER BY 
  date(posts.created_at)

그리고 리포트 코드 자체는 다음과 같습니다:

https://github.com/discourse/discourse/blob/8596aa34c46071eb42ffbb9e19ad733d1765578e/app/models/concerns/reports/posts.rb#L7-L32

불행히도 사용자의 사이트에 접근 권한이 없어 데이터베이스를 직접 살펴볼 수 없기 때문에, 더 깊이 디버깅하는 것은 다소 어렵습니다.

1개의 좋아요