Bug 19073: (bug 15758 follow-up) Dereference correct value from Koha::Object.
authorAlex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Thu, 10 Aug 2017 11:00:19 +0000 (13:00 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Aug 2017 19:25:33 +0000 (16:25 -0300)
* tools/modborrowers.pl: Dereference 'branchcode' rather than
  'value'.

Test Plan:
- Carry out "Batch patron modification" with any number of patrons.
  + Change the library.
  + Hit Save.
- The library will not have been updated.
- Apply patch.
- Run same modification.
- The library will have been updated

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

tools/modborrowers.pl

index 3b83f2b..5c8e1b6 100755 (executable)
@@ -148,7 +148,7 @@ if ( $op eq 'show' ) {
     # Construct drop-down list values
     my $branches = Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed;
     my @branches_option;
-    push @branches_option, { value => $_->{value}, lib => $_->{branchname} } for @$branches;
+    push @branches_option, { value => $_->{branchcode}, lib => $_->{branchname} } for @$branches;
     unshift @branches_option, { value => "", lib => "" };
     my @categories_option;
     push @categories_option, { value => $_->categorycode, lib => $_->description } for @patron_categories;