From 26469d87a261682dcbde0f41faa844133d10ed5e Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 14 Aug 2008 10:43:08 -0500 Subject: [PATCH] bug 2520: don't change item-level requests to bib-level Prior to this fix, changing the priority of any hold requests in the queue of requests for a bib would convert all item-level requests to title-level requests. As part of this fix, improved display of the holds queue so that item-level and bib-level requests can be more clearly distinguished. Documentation note: new screenshot of list of requests for a bib in the staff interface. Signed-off-by: Galen Charlton --- .../prog/en/modules/reserve/request.tmpl | 16 +++++++++++++++- reserve/modrequest.pl | 1 + reserve/request.pl | 7 +++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index da02cd6278..fd05087dea 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -360,7 +360,21 @@ if (alreadyreserved > "0"){ - Next available + + Only item + + + + " /> + + No Barcode + + + + + Next available + + only this type : diff --git a/reserve/modrequest.pl b/reserve/modrequest.pl index 79d95dcec4..7774ec58b8 100755 --- a/reserve/modrequest.pl +++ b/reserve/modrequest.pl @@ -62,6 +62,7 @@ if ($CancelBorrowerNumber) { # 2) Cancel or modify the queue list of reserves (without item linked) else { for (my $i=0;$i<$count;$i++){ + undef $itemnumber[$i] unless $itemnumber[$i] ne ''; ModReserve($rank[$i],$biblionumber[$i],$borrower[$i],$branch[$i],$itemnumber[$i]); #from C4::Reserves } } diff --git a/reserve/request.pl b/reserve/request.pl index eb41244959..f943d3cdbd 100755 --- a/reserve/request.pl +++ b/reserve/request.pl @@ -390,6 +390,13 @@ foreach my $res ( sort { $a->{found} cmp $b->{found} } @$reserves ) { } # set found to 1 if reserve is waiting for patron pickup $reserve{'found'} = 1 if $res->{'found'} eq 'W'; + } elsif ($res->{priority} > 0) { + if (defined($res->{itemnumber})) { + my $item = GetItem($res->{itemnumber}); + $reserve{'itemnumber'} = $res->{'itemnumber'}; + $reserve{'barcodenumber'} = $item->{'barcode'}; + $reserve{'item_level_hold'} = 1; + } } # get borrowers reserve info -- 2.39.5