Add username suggestion to user editor
Bug #1246867 reported by
Jeff Godin
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Wishlist
|
Jeff Godin |
Bug Description
This is a wishlist item.
It would be nice to have a "suggest username" function in the user editor.
This could take the form of a button with logic that would generate a username suggestion based on patron first and last name, email username, or some other pattern.
Duplicate usernames could be handled by trying alternate username patterns, or by appending digits, or by relying on staff to manually resolve -- or by offering a fallthrough: "nevermind, set the username to match the primary barcode".
Additionally, options for auto-suggestion of usernames for new users (including staged users that lack a non-UUID username) could be useful.
Working branch with basic proof of concept to follow.
Changed in evergreen: | |
status: | New → In Progress |
tags: | removed: webstaffclient |
To post a comment you must log in.
proof of concept in working branch user/jeff/ lp1246867_ suggest_ username
http:// git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeff/lp1246867_ suggest_ username
This uses a fixed "first initial plus last name" scheme, lowercased and with any non-letters removed.
Another approach that we've used successfully is to use the localpart of the patron's email address as a username.
The bits in the working branch that auto-suggest a username for staged users require that the username field be blank, which it almost never will be unless you have the changes in bug 1246859 applied.
Currently no effort is made to auto-generate a non-conflicting username value. If the single attempt to generate a username results in a duplicate, the standard "username already in use" indicator is displayed. Logic to try multiple schemes in order of preference and/or to auto-append digits or additional characters could be useful.