[Koha-bugs] [Bug 29043] Items are processed but not displayed on request.pl before a patron is selected

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 14 17:41:56 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29043

--- Comment #37 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
@ reserve/request.pl:199 @ $template->param(
     multi_hold => $multi_hold,
 );

+# If we are coming from the search result and only 1 is selected
+$biblionumber ||= $biblionumbers[0] unless $multi_hold;

 # If we have the borrowernumber because we've performed an action, then we
 # don't want to try to place another reserve.
 if ($borrowernumber_hold && !$action) {
@ reserve/request.pl:297 @ $template->param(
     messageclub     => $messageclub
 );

+# Load the hold list if
+#  - we are searching for a patron or club and found one
+#  - we are not searching for anything
+if (   ( $findborrower && $borrowernumber_hold || $findclub && $club_hold )
+    || ( !$findborrower && !$findclub ) )
+{
     # FIXME launch another time GetMember perhaps until (Joubu: Why?)
     my $patron = Koha::Patrons->find( $borrowernumber_hold );

@ reserve/request.pl:771 @ foreach my $biblionumber (@biblionumbers) {

     $template->param( biblioloop => \@biblioloop );
     $template->param( no_reserves_allowed => $no_reserves_allowed );
-$template->param( biblionumbers => join('/', @biblionumbers) );
     $template->param( exceeded_maxreserves => $exceeded_maxreserves );
     $template->param( exceeded_holds_per_record => $exceeded_holds_per_record
);
     $template->param( subscriptionsnumber =>
CountSubscriptionFromBiblionumber($biblionumber));
+} elsif ( ! $multi_hold ) {
+    my $biblio = Koha::Biblios->find( $biblionumber );
+    $template->param( biblio => $biblio );
+}

+if ( $multi_hold ) {
+    $template->param( biblionumbers => join('/', @biblionumbers) );
+} else {
+    $template->param( biblionumber => $biblionumber || $biblionumbers[0] );
+}

 # pass the userenv branch if no pickup location selected
 $template->param( pickup => $pickup || C4::Context->userenv->{branch} );

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list