Bug 5952: Shows member relatives in issues lists
[koha_gimpoz] / tools / batchMod.pl
index 6a702dc..d9a0b76 100755 (executable)
@@ -429,7 +429,8 @@ sub BuildItemsData{
                        my %this_row;
                        foreach my $field (grep {$_->tag() eq $itemtagfield} $itemmarc->fields()) {
                                # loop through each subfield
-                               if (my $itembranchcode=$field->subfield($branchtagsubfield) && C4::Context->preference("IndependantBranches")) {
+                               my $itembranchcode=$field->subfield($branchtagsubfield);
+                               if ($itembranchcode && C4::Context->preference("IndependantBranches")) {
                                                #verifying rights
                                                my $userenv = C4::Context->userenv();
                                                unless (($userenv->{'flags'} == 1) or (($userenv->{'branch'} eq $itembranchcode))){
@@ -456,8 +457,11 @@ sub BuildItemsData{
 
             # grab title, author, and ISBN to identify bib that the item
             # belongs to in the display
-                       my $biblio=GetBiblioData($$itemdata{biblionumber});
-            $this_row{bibinfo} = join("\n", @$biblio{qw(title author ISBN)});
+                        my $biblio=GetBiblioData($$itemdata{biblionumber});
+            $this_row{title} = $biblio->{title};
+            $this_row{author} = $biblio->{author};
+            $this_row{isbn} = $biblio->{isbn};
+            $this_row{biblionumber} = $biblio->{biblionumber};
 
                        if (%this_row) {
                                push(@big_array, \%this_row);
@@ -476,7 +480,11 @@ sub BuildItemsData{
                        $row_data{itemnumber} = $row->{itemnumber};
                        #reporting this_row values
                        $row_data{'nomod'} = $row->{'nomod'};
-            $row_data{bibinfo} = $row->{bibinfo};
+      $row_data{bibinfo} = $row->{bibinfo};
+      $row_data{author} = $row->{author};
+      $row_data{title} = $row->{title};
+      $row_data{isbn} = $row->{isbn};
+      $row_data{biblionumber} = $row->{biblionumber};
                        push(@item_value_loop,\%row_data);
                }
                my @header_loop=map { { header_value=> $witness{$_}} } @witnesscodessorted;