Logo
Explore Help
Sign In
discourse/discourse-solved
1
0
Fork 0
You've already forked discourse-solved
mirror of https://github.com/discourse/discourse-solved.git synced 2025-07-04 12:52:17 +00:00
Code Issues Packages Projects Releases Wiki Activity
discourse-solved/lib/discourse_solved/user_summary_extension.rb

14 lines
360 B
Ruby
Raw Normal View History

DEV: Fix new Rubocop offenses
2024-03-05 12:14:32 +01:00
# frozen_string_literal: true
module DiscourseSolved::UserSummaryExtension
extend ActiveSupport::Concern
def solved_count
FIX: Standardise the definition of what a solution is (#352) There are three locations where a user's solution query is defined - user summary - user card - user directory This PR updates the queries to use data from the new `SolvedTopics` table instead of the `UserActions` table. And adds testssssss
2025-03-28 09:49:02 +08:00
DiscourseSolved::SolvedTopic
FIX: Exclude deleted topics and posts as solution in user summary (#358) Follow up to #352 The user summary solutions count is more than it should be because of deleted topics and posts.
2025-04-04 16:43:00 +08:00
.joins(answer_post: :user, topic: {})
.where(posts: { user_id: @user.id, deleted_at: nil })
.where(topics: { archetype: Archetype.default, deleted_at: nil })
FIX: Standardise the definition of what a solution is (#352) There are three locations where a user's solution query is defined - user summary - user card - user directory This PR updates the queries to use data from the new `SolvedTopics` table instead of the `UserActions` table. And adds testssssss
2025-03-28 09:49:02 +08:00
.count
DEV: Fix new Rubocop offenses
2024-03-05 12:14:32 +01:00
end
end
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 51ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API