[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_4 updated. 0da485a3469a9a34c6267b6549d8319835bccfc6
Evergreen Git
git at git.evergreen-ils.org
Thu Feb 6 01:03:03 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_4 has been updated
via 0da485a3469a9a34c6267b6549d8319835bccfc6 (commit)
from 657658c642b21b0497d44fa9a087195b8dc5b06f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0da485a3469a9a34c6267b6549d8319835bccfc6
Author: Jeff Godin <jgodin at tadl.org>
Date: Wed Oct 30 13:20:28 2013 -0400
Skip duplicate username check when username unchanged
Changing a username, then changing back to the user's current
username results in a duplicate username detection -- a false
positive due to the API call finding a user with that username --
the current user. This prevents you from saving any other changes
you may have made to the user.
This can be prevented by skipping the duplicate username check if
the user is not new and the username in the field matches the
username stored in the in-memory Javascript representation of the
user.
There's still a potential corner case which could be avoided by
using a new/modified API call to either accept an "except this
au.id" argument or to return the au.id of the found user, but I
don't see a need for that at this point.
Signed-off-by: Jeff Godin <jgodin at tadl.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/web/js/ui/default/actor/user/register.js b/Open-ILS/web/js/ui/default/actor/user/register.js
index 832d973..c4c8e7d 100644
--- a/Open-ILS/web/js/ui/default/actor/user/register.js
+++ b/Open-ILS/web/js/ui/default/actor/user/register.js
@@ -1316,7 +1316,9 @@ function attachWidgetEvents(fmcls, fmfield, widget) {
var input = findWidget('au', 'usrname');
var usrname = input.widget.attr('value');
- if(!usrname) {
+ // Skip username check if the value is not yet present, or if this
+ // is a patron which already existed and the usrname value is unchanged
+ if(!usrname || (!patron.isnew() && usrname == patron.usrname())) {
dupeUsrname = false;
dojo.addClass(dojo.byId('uedit-dupe-username-warning'), 'hidden');
return;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/web/js/ui/default/actor/user/register.js | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list