Background:
Right now, the usernames in the Contributions tab are sorted by user id, which is not intuitive or very useful.
Acceptance Criteria:
- Given a user is on Special:EventDetails, contributions tab
- And they sort the table by user
- Then users should be sorted alphabetically according to their username
- And they sort the table by user
- And if a user is renamed via either UserMerge, Renameuser, or CentralAuth's global rename. [NOTE: Some of these are for single-wiki envs and don't work when the others are installed. Check the docs]
- Then their username in the table view is also updated
- And sorting by user uses the new username
- And if a user is hidden or deleted via CentralAuth, OR if it's suppressed via Special:Block in a single-wiki environment
- Then their username is removed from the ce_event_contributions DB table
- And the table view shows "Deleted user" or similar messages, unchanged from before this task
- And sorting by username treats all deleted/hidden users the same, regardless of their IDs
- And if the user is later unhidden/undeleted, these changes are reverted
Notes: You will need to apply the schema change manually in your local environment; for example, assuming SQLite:
ALTER TABLE ce_event_contributions ADD COLUMN cec_user_name BLOB DEFAULT NULL; CREATE INDEX cec_user_id_name ON ce_event_contributions (cec_user_id, cec_user_name);
Then, if you have existing entries and would like to backfill them (instead of truncating the table and regenerating them), you can use the script in P83943.


