Iâm quite sure that this canât be the issue â as it would only cause fewer numbers rather than more in some cases, correct? There is another example I have for you:
â Wrong: Profile - SGS - Garuda Linux Forum
â Right:
It seems impossible to me that this counting mechanism would more than double the amount of solved post counts. Besides that (of course unconfirmed) I highly doubt that the number of deleted posts was this high in my previous example.
I believe just found the bug (though the statement about discrepancy I mentioned above is still true) â
In the previous implementation, the solution count in Johnâs summary is counted by the number of times anyone marked the Johnâs post as solution
def solved_count
UserAction.where(user: @user).where(action_type: UserAction::SOLVED).count
end
In the new implementation, the solution count in Johnâs user summary is the number of times John marked a post as solution
def solved_count
DiscourseSolved::SolvedTopic.where(accepter: @user).count
end
This explains the large difference. âsolved countâ changed definitions from âhow many times you answeredâ to âhow many times you acceptedâ.
Will fix the bug, thanks again for the report!
Iâll also update the different counting methods used in profile popup and user summary.
Props to @ondrej for also mentioning Solution badge not working? to me. It looks like some discrepancies were already happening before this migration. Good thing is that weâll be migrating to a more consistent number across Discourse and our plugins.