From 0283a190a0f25f88f27b2b3fbfa84f62f57a6ee5 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 23 Feb 2021 15:28:27 -0300 Subject: [PATCH] [20.05.x] 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 --- C4/HoldsQueue.pm | 1 - t/db_dependent/HoldsQueue.t | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index 982ef34a921..12e641914a6 100755 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -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); diff --git a/t/db_dependent/HoldsQueue.t b/t/db_dependent/HoldsQueue.t index 91325a4d5db..3ce78a93941 100755 --- a/t/db_dependent/HoldsQueue.t +++ b/t/db_dependent/HoldsQueue.t @@ -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, } ); -- 2.30.1