Bug 19719: Add new column for collection in the patron checkouts data tables
authorJesse Maseto <jesse@bywatersolutions.com>
Fri, 2 Mar 2018 13:11:44 +0000 (13:11 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Wed, 22 Aug 2018 13:21:14 +0000 (13:21 +0000)
This makes the collection visible in the checkouts table
on the details and issues tab in the patron account in staff.

TEST:

1. Check out a few items to patron.
2. View check outs on patron account in staff client.
3. Collection code is not present.

4. Apply patch

5. Notice that not Collection code is visible while viewing check outs.

Signed-off-by: Severine QUEUNE <severine.queune@bulac.fr>
Signed-off by: Maksim Sen <maksim.sen@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

admin/columns_settings.yml
koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc
koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
koha-tmpl/intranet-tmpl/prog/js/checkouts.js
svc/checkouts

index 6f7022d..cec35f3 100644 (file)
@@ -252,6 +252,8 @@ modules:
         -
           columnname: item_type
         -
+          columnname: collection_code
+        -
           columnname: location
         -
           columnname: homebranch
@@ -407,6 +409,8 @@ modules:
         -
           columnname: item_type
         -
+          columnname: collection_code
+        -
           columnname: location
         -
           columnname: homebranch
index 9bcf780..3ac7536 100644 (file)
@@ -16,6 +16,7 @@
                         <th scope="col">Due date</th>
                         <th scope="col">Title</th>
                         <th scope="col">Item type</th>
+                        <th scope="col">Collection code</th>
                         <th scope="col">Location</th>
                         <th scope="col">Home library</th>
                         <th scope="col">Checked out on</th>
index c345a26..e9d060f 100644 (file)
@@ -852,6 +852,7 @@ No patron matched <span class="ex">[% message | html %]</span>
                     <th scope="col">Due date</th>
                     <th scope="col">Title</th>
                     <th scope="col">Item type</th>
+                    <th scope="col">Collection code</th>
                     <th scope="col">Location</th>
                     <th scope="col">Checked out on</th>
                     <th scope="col">Checked out from</th>
index b5edf48..c1830af 100644 (file)
@@ -297,6 +297,11 @@ $(document).ready(function() {
                 },
                 {
                     "mDataProp": function ( oObj ) {
+                        return oObj.ccode.escapeHtml();
+                    }
+                },
+                {
+                    "mDataProp": function ( oObj ) {
                         return oObj.location.escapeHtml();
                     }
                 },
@@ -633,6 +638,11 @@ $(document).ready(function() {
                     },
                     {
                         "mDataProp": function ( oObj ) {
+                            return oObj.ccode.escapeHtml();
+                        }
+                    },
+                    {
+                        "mDataProp": function ( oObj ) {
                             return oObj.location.escapeHtml();
                         }
                     },
index fefadee..d1fb8d3 100755 (executable)
@@ -90,6 +90,8 @@ my $sql = '
         items.itype,
         biblioitems.itemtype,
 
+        items.ccode,
+
         borrowernumber,
         surname,
         firstname,
@@ -171,6 +173,7 @@ while ( my $c = $sth->fetchrow_hashref() ) {
         barcode              => $c->{barcode},
         itemtype             => $item_level_itypes ? $c->{itype} : $c->{itemtype},
         itemtype_description => $itemtype ? $itemtype->translated_description : q{},
+        ccode                => $c->{ccode},
         location             => $location,
         homebranch           => $c->{homebranch},
         itemnotes            => $c->{itemnotes},