From 9cb582f0457789801d1c6504a5c5518a07a984cc Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 25 Oct 2018 11:45:25 +0000 Subject: [PATCH] Bug 21608: Disable dropdown for found holds - add button to revert To test: 1 - Find a record with multiple items 2 - Place 4 holds (or more) 3 - Capture one ohld as waiting, one as in transit 4 - View the holds on the record - switch the last to priority one 5 - Waiting and transit statuses get confused 6 - Apply patch 7 - Observe dropdown is now disabled for waiting holds 8 - Confirm other holds operate as expected 9 - Confirm 'Revert found status' resets hold --- C4/Reserves.pm | 5 +++++ koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 78e8f6a..bdf0e0a 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1425,6 +1425,11 @@ sub _FixPriority { my $sth = $dbh->prepare($query); $sth->execute( $reserve_id ); } + elsif ( $hold && $hold->found() && $rank > 0 ) { + $hold->found(undef); + $hold->store(); + } + my @priority; # get whats left diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc index 25af3b9..0e1cf27 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc @@ -26,7 +26,7 @@ - [% IF Koha.Preference('HoldsSplitQueue') == "nothing" %] + [% IF Koha.Preference('HoldsSplitQueue') == "nothing" && !hold.found %] @@ -191,7 +191,7 @@ [% END %] [% ELSE %] - + [% END %] [% END # IF SuspendHoldsIntranet %] -- 2.1.4