From c670df7a9772d9c6f0f02a5a85cc4f17a5e31c1e Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 10 Aug 2022 12:10:00 +0200
Subject: [PATCH] Bug 31335: Remove unnecessary holds fetch from
 routing-preview

This $count variable is not used later, and I didn't find why it was
there in previous versions.

Test plan:
Use `git log -p serials/routing-preview.pl` and confirm we can remove
this block

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
---
 serials/routing-preview.pl | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/serials/routing-preview.pl b/serials/routing-preview.pl
index fe23d3be8a..aa44f7e28b 100755
--- a/serials/routing-preview.pl
+++ b/serials/routing-preview.pl
@@ -69,13 +69,7 @@ if($op eq 'cud-save_and_preview'){
     $library = Koha::Libraries->find($branch);
 
 	if (C4::Context->preference('RoutingListAddReserves')){
-		# get existing reserves .....
 
-        my $holds = $biblio->current_holds;
-        my $count = $holds->count;
-        while ( my $hold = $holds->next ) {
-            $count-- if $hold->is_waiting;
-        }
 		my $notes;
 		my $title = $subs->{'bibliotitle'};
         for my $routing ( @routinglist ) {
-- 
2.30.2