Bugzilla – Attachment 175418 Details for
Bug 38331
Add date accessioned, item lost on, damaged on, withdrawn on, and date last seen columns to itemsearch results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results
Bug-38331-add-dateaccessioned-itemloston-damagedon.patch (text/plain), 9.28 KB, created by
Jason Robb
on 2024-12-12 18:58:00 UTC
(
hide
)
Description:
Bug 38331: add dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen as options in item search results
Filename:
MIME Type:
Creator:
Jason Robb
Created:
2024-12-12 18:58:00 UTC
Size:
9.28 KB
patch
obsolete
>From 3d65408318da3a07857ae2a15ca11d4e49570cee Mon Sep 17 00:00:00 2001 >From: Andrew Fuerste Henry <andrew@bywatersolutions.com> >Date: Thu, 12 Dec 2024 17:33:23 +0000 >Subject: [PATCH] Bug 38331: add dateaccessioned, itemlost_on, damaged_on, > withdrawn_on, datelastseen as options in item search results > >to test: >1 - have items with values in dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen >2 - perform an item search that returns those items >3 - observe these values are not available >4 - apply patch, restart_all >5 - repeat item search, those values still don't show >6 - go to table settings, see dateaccessioned, itemlost_on, damaged_on, withdrawn_on, datelastseen are now available to be displayed, but are hidden by default >7 - adjust table settings to show all new fields >8 - repeat search, now you see values! >9 - export results in available formats, confirm new values are in export > >Signed-off-by: Jason Robb <jrobb@sekls.org> >--- > admin/columns_settings.yml | 15 +++++++++++++++ > .../en/includes/catalogue/itemsearch_item.csv.inc | 10 ++++++++++ > .../includes/catalogue/itemsearch_item.json.inc | 5 +++++ > .../includes/csv_headers/catalogue/itemsearch.tt | 2 +- > .../prog/en/modules/catalogue/itemsearch.tt | 10 ++++++++++ > 5 files changed, 41 insertions(+), 1 deletion(-) > >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index cf3beff558..6f2d091d26 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -711,6 +711,21 @@ modules: > columnname: last_checkout_date > - > columnname: due_date >+ - >+ columnname: dateaccessioned >+ is_hidden: 1 >+ - >+ columnname: itemlost_on >+ is_hidden: 1 >+ - >+ columnname: damaged_on >+ is_hidden: 1 >+ - >+ columnname: withdrawn_on >+ is_hidden: 1 >+ - >+ columnname: datelastseen >+ 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..760c3783b0 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,13 @@ > "[% item.datelastborrowed | $KohaDates | $raw %]" > [%- delimiter | $raw -%] > "[% IF item.checkout %][% item.checkout.date_due | $KohaDates | $raw %][% END %]" >+[%- delimiter | $raw -%] >+"[% item.dateaccessioned | $KohaDates | $raw %]" >+[%- delimiter | $raw -%] >+"[% item.itemlost_on | $KohaDates | $raw %]" >+[%- delimiter | $raw -%] >+"[% item.damged_on | $KohaDates | $raw %]" >+[%- delimiter | $raw -%] >+"[% item.withdrawn_on | $KohaDates | $raw %]" >+[%- delimiter | $raw -%] >+"[% item.datelastseen | $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 c9a039f77c..477685f9fc 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,11 @@ > "[% (item.issues || 0) | html %]", > "[% item.datelastborrowed | $KohaDates %]", > "[% IF item.checkout %][% item.checkout.date_due | $KohaDates %][% END %]", >+ "[% item.dateaccessioned |$KohaDates %]", >+ "[% item.itemlost_on |$KohaDates %]", >+ "[% item.damaged_on |$KohaDates %]", >+ "[% item.withdrawn_on |$KohaDates %]", >+ "[% item.datelastseen |$KohaDates %]", > "[% FILTER escape_quotes ~%] > <div class="btn-group dropup"><button type="button" class="btn btn-xs btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <i class="fa-solid fa-pencil" aria-hidden="true"></i> Edit </button> <ul class="dropdown-menu dropdown-menu-end"> [% IF user.can_edit_items_from( item.homebranch ) %]<li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=[% item.biblionumber | uri %]&itemnumber=[% item.itemnumber | uri %]">Edit item</a></li>[% END %] <li><a class="dropdown-item" href="/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=[% item.biblionumber | html %]">Edit record</a></li> </ul> </div> > [%~ 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..156fb0b54e 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 accessioned") | html %]"[%- delimiter | $raw -%]"[% t("Item lost on date") | html %]"[%- delimiter | $raw -%]"[% t("Damaged on date") | html %]"[%- delimiter | $raw -%]"[% t("Withdrawn on date") | html %]"[%- delimiter | $raw -%]"[% t("Date last seen") | 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 69d7addc56..bd0064e4ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -479,6 +479,11 @@ > + ' <th id="items_checkouts" data-colname="checkouts">' + _("Checkouts") + '</th>' > + ' <th id="items_datelastborrowed" data-colname="last_checkout_date">' + _("Last checkout date") + '</th>' > + ' <th id="items_date_due" data-colname="due_date">' + _("Due date") + '</th>' >+ + ' <th id="items_dateaccessioned" data-colname="dateaccessioned">' + _("Date accessioned") + '</th>' >+ + ' <th id="items_itemlost_on" data-colname="itemlost_on">' + _("Item lost on date") + '</th>' >+ + ' <th id="items_damged_on" data-colname="damaged_on">' + _("Damaged on date") + '</th>' >+ + ' <th id="items_withdrawn_on" data-colname="withdrawn_on">' + _("Withdrawn on date") + '</th>' >+ + ' <th id="items_datelastseen" data-colname="datelastseen">' + _("Date last seen") + '</th>' > + ' <th id="itmes_actions" data-colname="actions">Actions</th>' > + ' </tr>'; > >@@ -673,6 +678,11 @@ > { 'name': 'issues' }, > { 'name': 'datelastborrowed' }, > { 'name': 'date_due' }, >+ { 'name': 'dateaccessioned' }, >+ { 'name': 'itemlost_on' }, >+ { 'name': 'damaged_on' }, >+ { 'name': 'withdrawn_on' }, >+ { 'name': 'datelastseen' }, > { 'name': 'actions', 'orderable': false, searchable: false, } > ], > "pagingType": "full_numbers", >-- >2.39.5
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 38331
:
173892
|
173921
|
175415
|
175418
|
177855