From 6cade0f566a1445ef60cecc69983cbca0eb12a8d Mon Sep 17 00:00:00 2001 From: Laura Escamilla 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=utf8 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 Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer --- .../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 ~%]
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 b9b71ae634..f8e560e07f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -388,6 +388,7 @@ + ' ' + _("Withdrawn status") + '' + ' ' + _("Damaged status") + '' + ' ' + _("Checkouts") + '' + + ' ' + _("Date last borrowed") + '' + ' ' + _("Due date") + '' + ' ' + ' '; @@ -511,6 +512,7 @@ { 'name': 'withdrawn' }, { 'name': 'damaged' }, { 'name': 'issues' }, + { 'name': 'datelastborrowed' }, { 'name': 'date_due' }, { 'name': 'actions', 'orderable': false } ], @@ -569,6 +571,7 @@ [% END %] { 'type': 'text' }, { 'type': 'text' }, + { 'type': 'text' }, null ] }); -- 2.39.5