Bugzilla – Attachment 44554 Details for
Bug 14867
userid not generated when defined in BorrowerUnwantedField
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14867 - userid not generated when defined in BorrowerUnwantedField
PASSED-QA-Bug-14867---userid-not-generated-when-de.patch (text/plain), 2.49 KB, created by
Kyle M Hall (khall)
on 2015-11-06 13:08:08 UTC
(
hide
)
Description:
[PASSED QA] Bug 14867 - userid not generated when defined in BorrowerUnwantedField
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-11-06 13:08:08 UTC
Size:
2.49 KB
patch
obsolete
>From 448b9297f04296aa45aa67ebb3f7556239bf6bd8 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Tue, 22 Sep 2015 09:49:39 +0200 >Subject: [PATCH] [PASSED QA] Bug 14867 - userid not generated when defined in BorrowerUnwantedField >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >When userid is not provided when creating a new patron, it is generated >using surname and firstname. The bug is when userid is defined in >syspref BorrowerUnwantedField, the input text is missing in patron >creation form. When saving you always get an alert message : >"Username/password already exists". No patron can be created. > >This patch corrects by adding this case to userid generation conditions. > >Test plan : >- add 'userid' in syspref BorrowerUnwantedField >- try to create a new patron : /cgi-bin/koha/members/memberentry.pl >- there is not input text for userid >- choose non-existing surname and firstname >- click on save > => Without patch : patron is not created, you see the alert message > "Username/password already exists" > => With patch : patron is created, userid is generated with surname > and firstname >- remove 'userid' in syspref BorrowerUnwantedField and check it can be > defined in patron creation form > >Signed-off-by: Frédéric Demians <f.demians@tamil.fr> > The issue is there, and this patch fixes it. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > members/memberentry.pl | 5 +++-- > 1 files changed, 3 insertions(+), 2 deletions(-) > >diff --git a/members/memberentry.pl b/members/memberentry.pl >index ba705a5..ae54383 100755 >--- a/members/memberentry.pl >+++ b/members/memberentry.pl >@@ -257,8 +257,9 @@ $newdata{'city'} = $input->param('city') if defined($input->param('city')) > $newdata{'zipcode'} = $input->param('zipcode') if defined($input->param('zipcode')); > $newdata{'country'} = $input->param('country') if defined($input->param('country')); > >-#builds default userid >-if ( (defined $newdata{'userid'}) && ($newdata{'userid'} eq '')){ >+# builds default userid >+# userid input text may be empty or missing because of syspref BorrowerUnwantedField >+if ( ( defined $newdata{'userid'} && $newdata{'userid'} eq '' ) || $check_BorrowerUnwantedField =~ /userid/ ) { > if ( ( defined $newdata{'firstname'} ) && ( defined $newdata{'surname'} ) ) { > # Full page edit, firstname and surname input zones are present > $newdata{'userid'} = Generate_Userid( $borrowernumber, $newdata{'firstname'}, $newdata{'surname'} ); >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 14867
:
42753
|
42755
|
44314
| 44554