Page MenuHomePhabricator

Automatically filled username incomplete and incorrect
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • my automatically filled username as campaign manager as well as as a participant/contributor are incorrect:

Logged in with my wiki-account en created a campaign, but my username is incorrect and can't edit it. Username as contributor also incorrect? see also

  • see campagins:

https://isa.toolforge.org/campaigns/164
https://isa.toolforge.org/campaigns/165
and
https://commons.wikimedia.org/wiki/Commons_talk:ISA_Tool#unable_to_edit_and/or_delete_campaign,_username_campaign_manager_incorrect

What happens?:

after creating an ISA campaign (twice) my username that is automatically filled in while being logged in, is incomplete, therefore incorrect and participants cannot reach me because the username stated in the project does not exist.

What should have happened instead?:
as campaign manager my username should be identical to the one I created the campaign with.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
browsers Chrome, Firefox etc.
screenshots:

incomplete username as campaign manager.JPG (203×906 px, 33 KB)

incomplete username as contributor.JPG (306×615 px, 20 KB)

correct username.JPG (101×598 px, 13 KB)

See also my other issue: can't edit or delete my campaigns

Event Timeline

This is caused by usernames in the database being limited to 20 characters. This means any user with a longer username will have a mismatch when compared with e.g. campaign manager.

The username field should allow 255 long strings, same as user_name in the MW user table (https://www.mediawiki.org/wiki/Manual:User_table#Schema_summary). Not sure what kind of SQLAlchemy string is appropriate since it's varbinary in MW.

Sebastian_Berlin-WMSE changed the task status from Open to In Progress.Feb 22 2022, 3:53 PM
Sebastian_Berlin-WMSE moved this task from Incoming Bugs to In progress on the ISA board.

Change 767523 had a related patch set uploaded (by Sebastian Berlin (WMSE); author: Sebastian Berlin (WMSE)):

[labs/tools/Isa@master] Increase username character length

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

The database will have to be migrated to deploy this patch. I haven't quite figured out how that's done best, but it looks like flask-migrate could be helpful.

There are 17 usernames that are 20 characters long in the database. Most of these look truncated.

Sebastian_Berlin-WMSE changed the task status from Open to In Progress.
Sebastian_Berlin-WMSE moved this task from Complete (deployed) to In progress on the ISA board.

Trying to migrate the database revealed some inconsistencies. Namely that there are several campaigns and contributions that have usernames not matching any users, even disregarding the truncation of some names.

The ones that exist in the database need to be fixed before the patch for this task can be deployed.

Created task to look into what causes this: T304090.

Change 767523 merged by jenkins-bot:

[labs/tools/Isa@master] Increase username character length

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

Jopparn renamed this task from automatically filled username incomplete and incorrect to Automatically filled username incomplete and incorrect.Oct 17 2022, 9:09 PM