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.