Points/Cheers not updated after merging accounts

AI-generated summary

A user, salbertelli, reports that after merging two accounts in Discourse 3.0.6, the leaderboard points (cheers) were not updated despite stats transferring correctly. JammyDodger suggests using the ‘recalculate scores’ option in the Gamification tab, but notes that this feature is unavailable in older versions. Moin asks if the latest version is being used, and JammyDodger confirms the version is outdated and recommends upgrading for security and functionality. As an alternative, JammyDodger suggests running a rake task: rake gamification_scores:backfill_scores_from[2000-01-01], which salbertelli confirms works. salbertelli then asks if this is a bug or if the background process responsible for score tallying can be identified, as the issue only occurs in production. JammyDodger acknowledges this as a known issue affecting the merge-user process and confirms that manual recalculation is the current workaround.

Hi all!

In testing, I successfully merged two user accounts, and their badges and points were transferred over to the target account as expected. However, yesterday, during the production merge, although the Stats were successfully transferred and updated in the Summary, the total number of leaderboard points (cheers) did not update and do not accurately reflect the user’s activity. The number of “Cheers” (41) remain the same pre/post merge.

Any assistance on how I can update the points is greatly appreciated.

You should be able to ‘recalculate scores’ from the Gamification tab and it will recount everything. I think there may also be a small delay in the displayed scores being updated too.

Hi @JammyDodger , thank you for reply. I don’t seem to have ‘recalculate scores’option.

Are you using the latest version of Discourse?

We are using Discourse 3.0.6

That is a few behind. You should really consider upgrading to pick up security fixes.

Though you should be able to use the older method of performing a rake task to backfill them instead:

rake gamification_scores:backfill_scores_from[2000-01-01]

Thank you! I appreciate the insight. I’ll give this a try and make sure to inform our team about the upgrade recommendation.

Much appreciated, JammyDodger. The rake task worked flawlessly.

However, we encountered the recurring issue of points not updating post merging accounts. I’m curious to know whether this is a bug or if you know the name of the specific background process responsible for tallying the scores? It’s peculiar that this occurs solely in our production environment. I want to give our server admin pertinent information to invesitage what might be hindering this process from running in prod.

Many TIA

Unfortunately it’s a known issue currently affecting the merge-user process. :frowning: Recalculating the scores manually from the Gamification tab is the recommendation (if you have it). Running the backfill each time is definitely a lot more awkward, so I certainly sympathise.

Thank you. I appreciate the insight and information on the behavior.