Page MenuHomePhabricator

Add capability for duplicating a user option to a new option via maintenance script
Closed, ResolvedPublic3 Estimated Story Points

Description

For T414370, we need to transition ~200k users from a hidden experiment preference (readinglists-web-ui-enabled) to the beta feature preference (readinglistsbeta).

This task involves adding the capability to duplicate a user preference (user option), e.g. set new option for all users with some particular current option.

To make this simple, add a one-off script setBetaPreference.php for this purpose.

Modifying the userOptions.php script in core is more involved, as the script does a lot already and we would need to be careful not to break any existing functionality there.

See T414370

Event Timeline

aude renamed this task from Add support in userOptions.php for duplicating a user option to a new option to Add capability for duplicating a user option to a new option via maintenance script.Mar 13 2026, 11:17 AM
aude claimed this task.
aude updated the task description. (Show Details)

Change #1251520 had a related patch set uploaded (by Aude; author: Aude):

[mediawiki/extensions/ReadingLists@master] Add setBetaPreference.php script to migrate users with experiment hidden preference

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

aude removed aude as the assignee of this task.Mar 13 2026, 7:37 PM
aude updated the task description. (Show Details)

Change #1251520 merged by jenkins-bot:

[mediawiki/extensions/ReadingLists@master] Add setBetaPreference.php script to migrate users with experiment hidden preference

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

Jdlrobson-WMF claimed this task.
Jdlrobson-WMF subscribed.

I don't think this can be easily QAed. I think we can do some dry-runs as part of the actual migration process when we are ready to do it.