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

            Bug ID: 28503
           Summary: When ReservesControlBranch set to "patron's home
                    library" and Hold policy set to "From home library"
                    all holds are allowed
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P5 - low
         Component: Hold requests
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected]

In C4::Reserves::CheckReserves we have:
next if (($branchitemrule->{'holdallowed'} eq 'from_home_library') && ($branch
ne $patron->branchcode));

Where $branch is the return of 
my $branch = GetReservesControlBranch( $item->unblessed, $patron->unblessed );

When ReservesControlBranch is set to "patron's home library" this boils down
to:
$patron->branchcode ne $patron->branchcode which will never be true

In all other locations we ue ReservesControlBranch to fetch the rule, but
always compare the item's homebranch to the patron's branchcode:
 543     if (   $branchitemrule->{holdallowed} eq 'from_home_library'
 544         && $borrower->{branchcode} ne $item->homebranch )
 545     {
 546         return { status => 'cannotReserveFromOtherBranches' };
 547     }

1409             || $branchitemrule->{holdallowed} eq 'from_home_library' &&
$param->{patron}->branchcode ne $i->homebranch

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to