From dee5f4945b645bbd314602479f990a08a896370c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 14 Aug 2008 20:59:52 -0500 Subject: [PATCH] bug 2523: add columns to holds queue report * added author, ccode, location, and item enumchron * sorted by collection, locatoin, call number, author, title As part of this patch, commented out the JavaScript tablesorter, which could cause the browerer to lock up if the picklist contains more than a couple hundred items to pull. Some sort of pagination is clearly required, but since it is necessary for customers to be able to print out the picklist, there still needs to be an option to see the complete list for a branch. This patch includes the final component of the fix for bug 2331. Signed-off-by: Galen Charlton --- circ/view_holdsqueue.pl | 17 +++++- .../prog/en/modules/circ/view_holdsqueue.tmpl | 55 +++++++++++-------- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/circ/view_holdsqueue.pl b/circ/view_holdsqueue.pl index 1b8c09bf9d..739dbe01a1 100755 --- a/circ/view_holdsqueue.pl +++ b/circ/view_holdsqueue.pl @@ -23,6 +23,7 @@ This script displays items in the tmp_holdsqueue table =cut use strict; +use warnings; use CGI; use C4::Auth; use C4::Output; @@ -92,10 +93,20 @@ $template->param( branchloop => \@branchloop, sub GetHoldsQueueItems { my ($branchlimit,$itemtypelimit) = @_; my $dbh = C4::Context->dbh; - my $query = "SELECT * FROM tmp_holdsqueue"; - $query.=" WHERE holdingbranch = \"$branchlimit\"" if $branchlimit; + + my @bind_params = (); + my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort + FROM tmp_holdsqueue + JOIN biblio USING (biblionumber) + LEFT JOIN items USING (itemnumber) + /; + if ($branchlimit) { + $query .=" WHERE holdingbranch = ?"; + push @bind_params, $branchlimit; + } + $query .= " ORDER BY ccode, location, cn_sort, author, title, pickbranch, reservedate"; my $sth = $dbh->prepare($query); - $sth->execute(); + $sth->execute(@bind_params); my $items = []; while ( my $row = $sth->fetchrow_hashref ){ $row->{reservedate} = format_date($row->{reservedate}); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl index d819121843..8a9d4c29bd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tmpl @@ -4,20 +4,20 @@ @@ -50,22 +50,33 @@ $.tablesorter.addParser({ Title + Author + Collection + Shelving Location Call Number - Patron - Phone Number - Date + Barcode + Enumeration Send To + Date - "> () + "> + + + - ">, () - - - + + + + + Any available copy + + + + -- 2.20.1