From 20c927c5d0fd84d34e00bc5042113825ae53869e Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Jun 2018 12:28:18 -0300 Subject: [PATCH] Bug 13655: Same fix for partial edit Test plan: - Create an organisation with surname='xxx' userid will be autogenerated with 'xxx'' - Edit the surname with 'yyy' userid will be unchanged, 'xxx' - Parial edit and blank userid userid will be autogenerated with 'yyy' Signed-off-by: Katrin Fischer Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 6ed356ce71..5dc318cae0 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -283,7 +283,7 @@ if ( ( defined $newdata{'userid'} && $newdata{'userid'} eq '' ) || $check_Borrow $patron->surname($newdata{surname}); $newdata{'userid'} = $patron->generate_userid; } - elsif ( ( defined $data{'firstname'} ) && ( defined $data{'surname'} ) ) { + elsif ( ( defined $data{'firstname'} || $category_type eq 'I' ) && ( defined $data{'surname'} ) ) { # Partial page edit (access through "Details"/"Library details" tab), firstname and surname input zones are not used # Still, if the userid field is erased, we can create a new userid with available firstname and surname # FIXME clean thiscode newdata vs data is very confusing -- 2.39.5