Skip to content

Commit

Permalink
Ticket CV2-5842: Use the article updated date instead of created date…
Browse files Browse the repository at this point in the history
… for top tags analytics
  • Loading branch information
caiosba committed Dec 17, 2024
1 parent da78439 commit dd55ea2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/team_statistics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ def top_articles_tags
FROM (
SELECT unnest(fcs.tags) AS tag FROM fact_checks fcs
INNER JOIN claim_descriptions cds ON fcs.claim_description_id = cds.id
WHERE cds.team_id = :team_id AND fcs.created_at BETWEEN :start_date AND :end_date AND fcs.language IN (:language)
WHERE cds.team_id = :team_id AND fcs.updated_at BETWEEN :start_date AND :end_date AND fcs.language IN (:language)
UNION ALL
SELECT unnest(explainers.tags) AS tag FROM explainers
WHERE explainers.team_id = :team_id AND explainers.created_at BETWEEN :start_date AND :end_date AND explainers.language IN (:language)
WHERE explainers.team_id = :team_id AND explainers.updated_at BETWEEN :start_date AND :end_date AND explainers.language IN (:language)
) AS all_tags
GROUP BY tag
ORDER BY tag_count DESC
Expand Down

0 comments on commit dd55ea2

Please sign in to comment.