Bug 7237 - duplicating patron not using patron's branch
authorOwen Leonard <oleonard@myacpl.org>
Fri, 18 Jul 2014 16:22:58 +0000 (12:22 -0400)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 30 Jul 2014 17:17:00 +0000 (14:17 -0300)
When duplicating a patron the original patron's library should be
preselected.

To test, apply the patch and choose a patron to duplicate, noting which
library is set as their home library. Click the "Duplicate" button and
cnofirm that the patron's library is preselected on the patron entry
form.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, no problems found.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
members/memberentry.pl

index 959a795..49f728e 100755 (executable)
@@ -604,7 +604,7 @@ if (C4::Context->userenv && C4::Context->userenv->{'branch'}) {
     $userbranch = C4::Context->userenv->{'branch'};
 }
 
-if (defined ($data{'branchcode'}) and ( $op eq 'modify' || ( $op eq 'add' && $category_type eq 'C' ) )) {
+if (defined ($data{'branchcode'}) and ( $op eq 'modify' || $op eq 'duplicate' || ( $op eq 'add' && $category_type eq 'C' ) )) {
     $userbranch = $data{'branchcode'};
 }