Bug 5825 - Add Item Type column to Holds Queue report
authorOwen Leonard <oleonard@myacpl.org>
Thu, 8 Aug 2013 20:06:14 +0000 (16:06 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Fri, 16 Aug 2013 15:15:31 +0000 (15:15 +0000)
The hold queue report shows collection code but not item type. This
patch adds it. Also added is use of the KohaAuthorisedValues template
plugin to display the collection code description instead of code.

To test, apply the patch and view the holds queue. There should be a new
item type column showing an item type description for each row. The
collection column should now show the collection description instead of
code.

Signed-off-by: Melia Meggs <melia@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
C4/HoldsQueue.pm
koha-tmpl/intranet-tmpl/prog/en/modules/circ/view_holdsqueue.tt

index 2052f09..1242fc5 100755 (executable)
@@ -119,7 +119,7 @@ sub GetHoldsQueueItems {
     my $dbh   = C4::Context->dbh;
 
     my @bind_params = ();
-    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn,items.copynumber
+    my $query = q/SELECT tmp_holdsqueue.*, biblio.author, items.ccode, items.itype, items.location, items.enumchron, items.cn_sort, biblioitems.publishercode,biblio.copyrightdate,biblioitems.publicationyear,biblioitems.pages,biblioitems.size,biblioitems.publicationyear,biblioitems.isbn,items.copynumber
                   FROM tmp_holdsqueue
                        JOIN biblio      USING (biblionumber)
                   LEFT JOIN biblioitems USING (biblionumber)
index 4c5f8d1..3482de6 100644 (file)
@@ -1,3 +1,5 @@
+[% USE ItemTypes %]
+[% USE KohaAuthorisedValues %]
 [% INCLUDE 'doc-head-open.inc' %]
 <title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
 [% INCLUDE 'doc-head-close.inc' %]
@@ -13,7 +15,7 @@
 <script type="text/javascript">//<![CDATA[
 $(document).ready(function() {
     $("#holdst").dataTable({
-        "aaSorting": [[ 2, "asc" ]],
+        "aaSorting": [[ 3, "asc" ]],
         "bPaginate": false,
         "bLengthChange": false,
         "bFilter": false,
@@ -53,6 +55,7 @@ $(document).ready(function() {
        <tr>
         <th class="hq-title">Title</th>
         <th class="hq-collection">Collection</th>
+        <th class="hq-itemtype">Item type</th>
         <th class="hq-callnumber">Call number</th>
         <th class="hq-copynumber">Copy number</th>
         <th class="hq-enumchron">Enumeration</th>
@@ -74,7 +77,8 @@ $(document).ready(function() {
                                          [% IF ( itemsloo.size ) %][% itemsloo.size %][% END %] [% IF ( itemsloo.isbn ) %]ISBN: [% itemsloo.isbn %][% END %]</p>
                        </div>
                        </td>
-            <td class="hq-collection">[% itemsloo.ccode %]</td>
+            <td class="hq-collection">[% KohaAuthorisedValues.GetByCode( 'CCODE', itemsloo.ccode ) %]</td>
+            <td class="hq-itemtype">[% ItemTypes.GetDescription( itemsloo.itype ) %]</td>
             <td class="hq-callnumber">[% itemsloo.location %] [% itemsloo.itemcallnumber %]</td>
             <td class="hq-copynumber">[% itemsloo.copynumber %]</td>
             <td class="hq-enumchron">[% itemsloo.enumchron %]</td>