Page MenuHomePhabricator

Fix IP reveal preference log entry for Special:Preferences/reset
Closed, ResolvedPublic

Description

Background

Special:Preferences/reset sets a user's preferences to their defaults. If the IP reveal preference was enabled, it will be set to disabled.

We are meant to log whenever the IP reveal preference is changed: T335365.

However, the log is not made if it is disabled via Special:Preferences/reset.

Acceptance criteria

The preference change is logged whether the preference is changed via manually changing it in Special:Preferences, or via Special:Preferences/reset.

Event Timeline

Change #1114776 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/core@master] preferences: Trigger onSaveUserOptions after saving user preferences

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

Change #1120203 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/CheckUser@master] preferences: Make sure IP reveal is contained in the modified options

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

Change #1114776 abandoned by Harroyo-wmf:

[mediawiki/core@master] preferences: Trigger onSaveUserOptions after saving user preferences

Reason:

Superseded by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/CheckUser/+/1120203

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

Change #1120203 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] preferences: Make sure IP reveal is contained in the modified options

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

Change #1120606 had a related patch set uploaded (by Harroyo-wmf; author: Harroyo-wmf):

[mediawiki/extensions/CheckUser@master] preferences: Fix tests for Preferences hook handler

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

A fix for this has been merged.

There is an additional patch pending review that only updates the unit tests, therefore I think this can already be moved forward for QA.

Change #1120606 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] preferences: Fix tests for Preferences hook handler

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

Djackson-ctr subscribed.

QA is completed, I have verified the new code has been implemented and is functioning as expected (The preference change is now being logged whether the preference is changed via manually changing it in Special:Preferences, or via Special:Preferences/reset)... Thank you @hector.arroyo.

image.png (770×1 px, 100 KB)