Bug 13655: Allow creation of organisations without entering userid
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 12 Apr 2018 16:40:59 +0000 (13:40 -0300)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 22 Jun 2018 13:12:54 +0000 (13:12 +0000)
See comment 1 of the bug report for defails of the issue.

Test plan:
Good luck (you will need to test all combinations (category type eq and
ne 'I'), then quick edition and partial edit)

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
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>
members/memberentry.pl

index 0a5e81b..6ed356c 100755 (executable)
@@ -277,7 +277,7 @@ $newdata{'lang'}    = $input->param('lang')    if defined($input->param('lang'))
 # 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/ && !defined $data{'userid'} ) {
-    if ( ( defined $newdata{'firstname'} ) && ( defined $newdata{'surname'} ) ) {
+    if ( ( defined $newdata{'firstname'} || $category_type eq 'I' ) && ( defined $newdata{'surname'} ) ) {
         # Full page edit, firstname and surname input zones are present
         $patron->firstname($newdata{firstname});
         $patron->surname($newdata{surname});