Bug 27068: (follow-up) Remove local hold priority exclusion-related code for 20.05.x

The local hold priority exclusions feature is only present in 20.11, so
the use case handling shouldn't be included in the backport. This code
removes the couple lines in which this is handled (trivial) and tested
(trivial, as it is disabled by default on the tests, we just remove the
places in which the original patch set the non-existent attributes).

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/HoldsQueue.t
=> FAIL: Tests fail!
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2021-02-23 15:28:27 -03:00 committed by Andrew Fuerste-Henry
parent bf045e483a
commit 41cb970fee
2 changed files with 1 additions and 3 deletions

View File

@ -454,7 +454,6 @@ sub MapItemsToHoldRequests {
my $local_hold_match;
foreach my $item (@$available_items) {
next if $item->{_object}->exclude_from_local_holds_priority;
next unless _checkHoldPolicy($item, $request);

View File

@ -1379,7 +1379,7 @@ subtest "Test _checkHoldPolicy" => sub {
my $library1 = $builder->build_object( { class => 'Koha::Libraries' } );
my $library2 = $builder->build_object( { class => 'Koha::Libraries' } );
my $library_nongroup = $builder->build_object( { class => 'Koha::Libraries' } );
my $category = $builder->build_object( { class => 'Koha::Patron::Categories', value => {exclude_from_local_holds_priority => 0} });
my $category = $builder->build_object( { class => 'Koha::Patron::Categories' });
my $patron = $builder->build_object(
{
class => "Koha::Patrons",
@ -1394,7 +1394,6 @@ subtest "Test _checkHoldPolicy" => sub {
{
biblionumber => $biblio->biblionumber,
library => $library1->branchcode,
exclude_from_local_holds_priority => 0,
}
);