Bug 24176: Add datalastseen column to holdings table
authorLucas Gass <lucas@bywatersolutions.com>
Sun, 2 Aug 2020 16:49:59 +0000 (16:49 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 13 Aug 2020 05:55:44 +0000 (07:55 +0200)
This patch adds the datelastseen column to the holdings table and also makes it column configurable.
To Test:
-Apply patch and have a look at some item records.
-Notice the datalastseen column
-Make sure it wroks and its displaying the datelastseen correctly
-Go to the column configuration tools and make sure you can properly hide this column.

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

admin/columns_settings.yml
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt

index 45d47ad..a73e577 100644 (file)
@@ -289,6 +289,8 @@ modules:
             -
               columnname: holdings_dateaccessioned
             -
+              columnname: holdings_datelastborrowed
+            -
               columnname: holdings_barcode
             -
               columnname: holdings_enumchron
index 8903ec5..dad9ade 100644 (file)
                 <th id="[% tab | html %]_status" data-colname="[% tab | html %]_status">Status</th>
                 <th id="[% tab | html %]_lastseen" data-colname="[% tab | html %]_lastseen" class="title-string">Last seen</th>
                 <th id="[% tab | html %]_dateaccessioned" data-colname="[% tab | html %]_dateaccessioned" class="title-string">Date accessioned</th>
+                <th id="[% tab | html %]_datelastborrowed" data-colname="[% tab | html %]_datelastborrowed" class="title-string">Date last borrowed</th>
                 <th id="[% tab | html %]_barcode" data-colname="[% tab | html %]_barcode">Barcode</th>
                 [% IF ( itemdata_uri ) %]<th id="[% tab | html %]_uri" data-colname="[% tab | html %]_uri">URL</th>[% END %]
                 [% IF ( itemdata_copynumber ) %]<th id="[% tab | html %]_copynumber" data-colname="[% tab | html %]_copynumber">Copy number</th>[% END %]
@@ -450,6 +451,7 @@ Note that permanent location is a code, and location may be an authval.
                     </td>
                     <td class="datelastseen"><span title="[% item.datelastseen | html %]">[% item.datelastseen | $KohaDates %]</span></td>
                     <td class="dateaccessioned"><span title="[% item.dateaccessioned | html %]">[% item.dateaccessioned | $KohaDates %]</span></td>
+                    <td class="datelastborrowed"><span title="[% item.datelastborrowed | html %]">[% item.datelastborrowed | $KohaDates %]</span></td>
                     <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?type=[% item.type | uri %]&amp;itemnumber=[% item.itemnumber | uri %]&amp;biblionumber=[% item.biblionumber | uri %]&amp;bi=[% item.biblioitemnumber | uri %]#item[% item.itemnumber | uri %]">[% item.barcode | html %]</a></td>
                     [% IF ( itemdata_uri ) %]
                         [% IF item.uri.split(' \| ').size > 1 %]