Bug 17285: (15758 follow-up) Fix advanced editor
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Sep 2016 15:45:22 +0000 (16:45 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Mon, 12 Sep 2016 15:33:11 +0000 (15:33 +0000)
Little mistake from df97814, $branches is a hash { branchcode =>
branchname }

Test plan:
Edit a biblio with the advanced editor

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
The advanced editor works as expected

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
svc/cataloguing/framework

index b0099e8..4880b8a 100755 (executable)
@@ -32,7 +32,7 @@ my $authorised_values = {};
 my $branches = { map { $_->branchcode => $_->branchname } Koha::Libraries->search_filtered };
 $authorised_values->{branches} = [];
 foreach my $thisbranch ( sort keys %$branches ) {
-    push @{ $authorised_values->{branches} }, { value => $thisbranch, lib => $branches->{$thisbranch}->{'branchname'} };
+    push @{ $authorised_values->{branches} }, { value => $thisbranch, lib => $branches->{$thisbranch} };
 }
 
 $authorised_values->{itemtypes} = [ $schema->resultset( "Itemtype" )->search( undef, {