Page MenuHomePhabricator

Fix: Image Recs #suggestededit`event_comment` values being sent for non-Suggested Edit edits
Closed, ResolvedPublic

Description

Because some of the Add Image event screens are the same whether edit comes from Suggested Edits or from within article some edits that were not originated from Suggested Edits are being labelled as #suggestededit-add-image-top OR #suggestededit-add-image-infobox (both are used) in event_comment edit data that goes to the revision datasets.

We need to omit sending those event_comment values for edits that are not actually Suggested Edits. @Sharvaniharan has looked into this but I believ this taks will be handled by @cooltey. Lmk if you need more info.

Event Timeline

SNowick_WMF renamed this task from Fix: Image Recs `event_comment` values being sent for non-Suggested Edit edits to Fix: Image Recs #suggestededit`event_comment` values being sent for non-Suggested Edit edits.Nov 30 2023, 9:10 PM
SNowick_WMF created this task.

Hi @SNowick_WMF

After checking the code and running a couple of tests, the logic in the current production is correct.

1701447615881.jpg (154×1 px, 97 KB)

The #suggestededit-add-image-top OR #suggestededit-add-image-infobox tags will only show up if the user makes an image recommendation edit from the Suggested Edits.

@Sharvaniharan said you checked the edit count by querying the username of the edit, and I guess that the edit count was not the "total edit count" in the database.

We are using the total contributions that are from Wikidata, WIkiCommons, and the Wiki of your primary language.

totalContributions += wikidataResponse.query?.userInfo!!.editCount
totalContributions += commonsResponse.query?.userInfo!!.editCount
totalContributions += homeSiteResponse.query?.userInfo!!.editCount

Since the logic of adding edit tags is correct, could you please help to verify if the edit count comes from the three sites above? Thanks!

SNowick_WMF closed this task as Resolved.EditedDec 12 2023, 5:26 PM

This is resolved, the code was operating as expected. Note that the column value in mediawiki_history for event_user_revision_count is by wiki only, not a sum of editors edits rollup - the definition is "Number of revisions made by the event_user up to the historical time in this wiki_db (only available in revision-create events so far). For revision-create events, this includes the event itself."

In order to get editor edit total counts added a sum for MAX event_user_revision_count by wiki_db to query.