Page MenuHomePhabricator

Add query helper service to provide number of thanks received by a user
Closed, ResolvedPublic

Description

The GrowthExperiments extension queries the database directly to count the number of thanks a given user has.

While working on T324166 a similar need was identified.

There are 2 existing problems with the code living in GrowthExperiments:

  1. any changes to the internals of thanks would need to be reflected in GrowthExperiments.
  2. No reuse

TODO

  • Thanks should provide a new service for accessing number of thanks
  • GrowthExperiments updated to use the new service.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 867691 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Thanks@master] Adds the ThanksQuery service

https://gerrit.wikimedia.org/r/867691

Change 867692 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/GrowthExperiments@master] Use the ThanksQuery service

https://gerrit.wikimedia.org/r/867692

Change 867691 merged by jenkins-bot:

[mediawiki/extensions/Thanks@master] Adds the ThanksQueryHelper service

https://gerrit.wikimedia.org/r/867691

Change 867692 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Use the ThanksQueryHelper service

https://gerrit.wikimedia.org/r/867692

Thanks for the review and assistance with the GrowthExperiments patch!

Etonkovidova claimed this task.
Etonkovidova updated the task description. (Show Details)
kostajh renamed this task from there should be a service to query number of Thanks to Add query helper service to provide number of thanks received by a user.Jan 4 2023, 7:20 PM