From 9d31c0fb4d2f1d933f70d1e57268f96d35fad9f4 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 1 Nov 2024 20:46:00 +0000 Subject: [PATCH] Bug 38331: Add date accessioned column to item search results To test: 1. APPLY PATCH, restart_all 2. Do an item search, you should not see a 'Date aquired' column. 3. Go to Administration > Table settings. 4. Under catalog find the dateaccessioned column. BY default it should be hidden. 5. Uncheck it to make that column show. 6. Do step 2 again, this time you should see the date accessioned column. 7. Make sure the data in the column is correct. 8. From the top navbar click 'Export all results to', making sure the 'Date aquaied' column is in the CSV. Note about exporting. With Bug 37238 we now have two ways of exporting files like CSV. Do we want to keep both? The dataTables one is nice because it will only export columns you have exposed. Signed-off-by: Michaela Sieber --- admin/columns_settings.yml | 3 +++ .../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 +++ 5 files changed, 10 insertions(+), 1 deletion(-) diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml index b8b39098b5..7dac635c46 100644 --- a/admin/columns_settings.yml +++ b/admin/columns_settings.yml @@ -693,6 +693,9 @@ modules: columnname: last_checkout_date - columnname: due_date + - + columnname: dateaccessioned + is_hidden: 1 - columnname: actions cannot_be_toggled: 1 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 a08f8e2eab..0fddb0200e 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 @@ -46,3 +46,5 @@ "[% item.datelastborrowed | $KohaDates | $raw %]" [%- delimiter | $raw -%] "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% END %]" +[%- delimiter | $raw -%] +"[% item.dateaccessioned | $KohaDates | $raw %]" 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 d1eda11819..d5bc2c590f 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 @@ -34,6 +34,7 @@ "[% (item.issues || 0) | html %]", "[% item.datelastborrowed | $KohaDates %]", "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]", + "[% item.dateaccessioned | $KohaDates %]", "[% FILTER escape_quotes ~%]
[%~ END %]" 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 502470d854..dacbab1acc 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("Item number") | 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("Last checkout date") | 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("Item number") | 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("Last checkout date") | html %]"[%- delimiter | $raw -%]"[% t("Due date") | html %]"[%- delimiter | $raw -%]"[% t("Date acquired") | 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 b9d1f42a4d..b031574047 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -476,6 +476,7 @@ + ' ' + _("Checkouts") + '' + ' ' + _("Last checkout date") + '' + ' ' + _("Due date") + '' + + ' ' + _("Date acquired") + '' + ' Actions' + ' '; @@ -613,6 +614,7 @@ { 'name': 'issues' }, { 'name': 'datelastborrowed' }, { 'name': 'date_due' }, + { 'name': 'dateaccessioned' }, { 'name': 'actions', 'orderable': false } ], "pagingType": "full_numbers", @@ -672,6 +674,7 @@ { 'type': 'text' }, { 'type': 'text' }, { 'type': 'text' }, + { 'type': 'text' }, null ] }); -- 2.39.5