Bugzilla – Attachment 164428 Details for
Bug 36499
Add last checkout date column to the item search results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36499: Added datelastborrowed column to item search results
Bug-36499-Added-datelastborrowed-column-to-item-se.patch (text/plain), 7.08 KB, created by
ByWater Sandboxes
on 2024-04-04 15:17:21 UTC
(
hide
)
Description:
Bug 36499: Added datelastborrowed column to item search results
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2024-04-04 15:17:21 UTC
Size:
7.08 KB
patch
obsolete
>From 25433cbe175b9fd0cb06bb3c4f7b284b8f4f9bc3 Mon Sep 17 00:00:00 2001 >From: Laura Escamilla <laura.escamilla@bywatersolutions.com> >Date: Thu, 4 Apr 2024 13:26:06 +0000 >Subject: [PATCH] Bug 36499: Added datelastborrowed column to item search > results >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Test plan: >1. Apply patch >2. Checkout an item to a patron >3. Perform an item search and either search as is, or add a âLast checkout date:â of todayâs date for a more refined search. > 1. Notice that there is now a date last borrowed column by the date due column > 2. Export the table into a CSV and notice that there is also a date last borrowed column there >4. Sign off and have an amazing day :D > >Signed-off-by: Michelle Spinney <mspinney@clamsnet.org> >--- > .../prog/en/includes/catalogue/itemsearch_item.csv.inc | 2 ++ > .../prog/en/includes/catalogue/itemsearch_item.json.inc | 1 + > .../prog/en/includes/csv_headers/catalogue/itemsearch.tt | 2 +- > .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 3 +++ > 4 files changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >index e59eca534e..3cb0118bee 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.csv.inc >@@ -41,4 +41,6 @@ > [%- delimiter | $raw -%] > "[% (item.issues || 0) | $raw %]" > [%- delimiter | $raw -%] >+"[% item.datelastborrowed | $KohaDates | $raw %]" >+[%- delimiter | $raw -%] > "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% END %]" >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >index 5ef1019911..ef09d7d506 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue/itemsearch_item.json.inc >@@ -31,6 +31,7 @@ > "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.withdrawn', authorised_value => item.withdrawn ) || "" | html %]", > "[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => item.damaged ) || "" | html %]", > "[% (item.issues || 0) | html %]", >+ "[% item.datelastborrowed | $KohaDates %]", > "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]", > "[% FILTER escape_quotes ~%] > <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit <span class="caret"></span> </button> <ul class="dropdown-menu pull-right"> [% IF user.can_edit_items_from( item.homebranch ) %]<li><a href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li>[% END %] <li><a href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >index f1f4ebc79a..652a0b4624 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/csv_headers/catalogue/itemsearch.tt >@@ -3,5 +3,5 @@ > [%- PROCESS 'i18n.inc' -%] > [%- SET delimiter = Koha.CSVDelimiter() -%] > [%- BLOCK -%] >- "[% t("Title") | html %]"[%- delimiter | $raw -%]"[% t("Publication date") | html %]"[%- delimiter | $raw -%]"[% t("Publisher") | html %]"[%- delimiter | $raw -%]"[% t("Collection") | html %]"[%- delimiter | $raw -%]"[% t("Barcode") | html %]"[%- delimiter | $raw -%]"[% t("Serial enumeration") | html %]"[%- delimiter | $raw -%]"[% t("Call number") | html %]"[%- delimiter | $raw -%]"[% t("Home library") | html %]"[%- delimiter | $raw -%]"[% t("Current library") | html %]"[%- delimiter | $raw -%]"[% t("Shelving location") | html %]"[%- delimiter | $raw -%]"[% t("Item type") | html %]"[%- delimiter | $raw -%]"[% t("Inventory number") | html %]"[%- delimiter | $raw -%]"[% t("Not for loan status") | html %]"[%- delimiter | $raw -%]"[% t("Lost status") | html %]"[%- delimiter | $raw -%]"[% t("Withdrawn status") | html %]"[%- delimiter | $raw -%]"[% t("Damaged status") | html %]"[%- delimiter | $raw -%]"[% t("Checkouts") | html %]"[%- delimiter | $raw -%]"[% t("Due date") | html %]" >+ "[% t("Title") | html %]"[%- delimiter | $raw -%]"[% t("Publication date") | html %]"[%- delimiter | $raw -%]"[% t("Publisher") | html %]"[%- delimiter | $raw -%]"[% t("Collection") | html %]"[%- delimiter | $raw -%]"[% t("Barcode") | html %]"[%- delimiter | $raw -%]"[% t("Serial enumeration") | html %]"[%- delimiter | $raw -%]"[% t("Call number") | html %]"[%- delimiter | $raw -%]"[% t("Home library") | html %]"[%- delimiter | $raw -%]"[% t("Current library") | html %]"[%- delimiter | $raw -%]"[% t("Shelving location") | html %]"[%- delimiter | $raw -%]"[% t("Item type") | html %]"[%- delimiter | $raw -%]"[% t("Inventory number") | html %]"[%- delimiter | $raw -%]"[% t("Not for loan status") | html %]"[%- delimiter | $raw -%]"[% t("Lost status") | html %]"[%- delimiter | $raw -%]"[% t("Withdrawn status") | html %]"[%- delimiter | $raw -%]"[% t("Damaged status") | html %]"[%- delimiter | $raw -%]"[% t("Checkouts") | html %]"[%- delimiter | $raw -%]"[% t("Date last borrowed") | html %]"[%- delimiter | $raw -%]"[% t("Due date") | html %]" > [%- END -%] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index 2b064b157f..973232be5c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -389,6 +389,7 @@ > + ' <th id="items_widthdrawn">' + _("Withdrawn status") + '</th>' > + ' <th id="items_damaged">' + _("Damaged status") + '</th>' > + ' <th id="items_checkouts">' + _("Checkouts") + '</th>' >+ + ' <th id="items_datelastborrowed">' + _("Date last borrowed") + '</th>' > + ' <th id="items_date_due">' + _("Due date") + '</th>' > + ' <th id=""></th>' > + ' </tr>'; >@@ -508,6 +509,7 @@ > { 'name': 'withdrawn' }, > { 'name': 'damaged' }, > { 'name': 'issues' }, >+ { 'name': 'datelastborrowed' }, > { 'name': 'date_due' }, > { 'name': 'actions', 'orderable': false } > ], >@@ -566,6 +568,7 @@ > [% END %] > { 'type': 'text' }, > { 'type': 'text' }, >+ { 'type': 'text' }, > null > ] > }); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36499
:
164423
|
164428
|
165033