Browse Source

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 <katrin.fischer.83@web.de>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
18.11.x
Jonathan Druart 3 years ago
committed by Nick Clemens
parent
commit
20c927c5d0
  1. 2
      members/memberentry.pl

2
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

Loading…
Cancel
Save