== Background
- In T420548, there is an initial implementation of a maintenance script to sync donor preferences from a csv file to a MediaWiki global preference, taking in account if a user does not give consent for this.
Potentially the csv file could have 1 million rows. Currently the script processes users in a row-by-row process which can be slow if the csv is very large.
== User story
- Read and process a batch of email addresses, and do a batch db lookup `WHERE gu_email IN (...) AND gu_email_authenticated IS NOT NULL`
- Is there a way to do localUserFromCentralId with a batch of central ids?
- Avoid calling saveOptions once per user.
See the SetReadingListHiddenPreference script for some other ideas.
Maybe the UserPreferenceBatchUpdater could be moved to MediaWiki core and then be used for the donor preference.
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ReadingLists/+/refs/heads/master/src/Service/UserPreferenceBatchUpdater.php
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/ReadingLists/+/refs/heads/master/maintenance/setReadingListHiddenPreference.php
== Requirements
- Add task requirements. Requirements should be user-centric, well-defined, unambiguous, implementable, testable, consistent, and comprehensive
=== BDD
- For QA engineer to fill out
=== Test Steps
- For QA engineer to fill out
== Design
- Add mockups and design requirements
== Acceptance criteria
- Add acceptance criteria
== Communication criteria - does this need an announcement or discussion?
- Add communication criteria
== Rollback plan
- What is the rollback plan in production for this task if something goes wrong?
//This task was created by Version 1.3.0 of the [[ https://mediawiki.org/w/index.php?title=Reading/Web/Request_process | Web team task template ]] using [[ https://phabulous.toolforge.org/ | phabulous ]] //