Add username suggestion to user editor

Bug #1246867 reported by Jeff Godin
16
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.

Tags: patron
Revision history for this message
Jeff Godin (jgodin) wrote :

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.

Ben Shum (bshum)
Changed in evergreen:
status: New → In Progress
Revision history for this message
Terran McCanna (tmccanna) wrote :

Removing "In Progress" status since previous work would need to be redone in Angular in order for this to work.

Changed in evergreen:
status: In Progress → Confirmed
tags: added: webstaffclient
removed: staffclient
tags: added: patron
removed: usereditor
tags: removed: webstaffclient
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.