Bugzilla – Attachment 185786 Details for
Bug 38946
Add serial enumeration to inventory table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38946: Add enumchron to inventory table
Bug-38946-Add-enumchron-to-inventory-table.patch (text/plain), 4.89 KB, created by
David Cook
on 2025-08-26 07:04:57 UTC
(
hide
)
Description:
Bug 38946: Add enumchron to inventory table
Filename:
MIME Type:
Creator:
David Cook
Created:
2025-08-26 07:04:57 UTC
Size:
4.89 KB
patch
obsolete
>From 1ac67d263ee577a9e5cbe3810b5f45eea753c3b9 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 26 Aug 2025 06:54:08 +0000 >Subject: [PATCH] Bug 38946: Add enumchron to inventory table > >This patch adds "Serial enumeration / chronology" to the inventory table >output. > >Test plan: >0. Apply the patch >1. Go to http://localhost:8081/cgi-bin/koha/tools/inventory.pl >2. Click "Submit" >3. Note that a "Serial enumeration / chronology" column appears in >the results >4. For the top result, go into the bib record and then add a "Serial enumeration / >chronology" to the item in question >5. Re-run the inventory >6. Note that the "Serial enumeration / chronology" now has a value in iy >7. Click "Columns" and hide the column >8. Try again using the CSV export and note that the new column appears again >--- > C4/Items.pm | 2 +- > admin/columns_settings.yml | 2 ++ > koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt | 5 +++++ > tools/inventory.pl | 4 ++-- > 4 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/C4/Items.pm b/C4/Items.pm >index 2c22518dc5..67c381e256 100644 >--- a/C4/Items.pm >+++ b/C4/Items.pm >@@ -603,7 +603,7 @@ sub GetItemsForInventory { > my $max_cnsort = GetClassSort( $class_source, undef, $maxlocation ); > > my $select_columns = q{ >- SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber, items.cn_sort, ccode >+ SELECT DISTINCT(items.itemnumber), barcode, itemcallnumber, title, author, biblio.biblionumber, biblio.frameworkcode, datelastseen, homebranch, location, notforloan, damaged, itemlost, withdrawn, stocknumber, items.cn_sort, ccode, enumchron > > }; > my $select_count = q{SELECT COUNT(DISTINCT(items.itemnumber))}; >diff --git a/admin/columns_settings.yml b/admin/columns_settings.yml >index 7b9e4e7ec8..a6dc345c0f 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -2607,6 +2607,8 @@ modules: > columnname: call_number > cannot_be_toggled: 1 > cannot_be_modified: 1 >+ - >+ columnname: enumchron > - > columnname: library > - >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >index ba68b0eb97..a01b8e90d8 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/inventory.tt >@@ -311,6 +311,7 @@ > [% END %] > <th id="barcode" data-colname="barcode">Barcode</th> > <th id="call_number" data-colname="call_number">Call number</th> >+ <th id="enumchron" data-colname="enumchron">Serial enumeration / chronology</th> > <th id="library" data-colname="library">Library</th> > <th id="collection" data-colname="collection">Collection</th> > <th id="title" data-colname="title" class="anti-the">Title</th> >@@ -335,6 +336,10 @@ > > <td data-order="[% result.cn_sort | html %]"> [% result.itemcallnumber | html %] </td> > >+ <td> >+ <span class="enumchron">[% result.enumchron | html %]</span> >+ </td> >+ > <td> > [% Branches.GetName( result.homebranch ) | html %] > <span class="shelvingloc">[% result.location | html %]</span> >diff --git a/tools/inventory.pl b/tools/inventory.pl >index 8e735d40e4..01d9cb3aed 100755 >--- a/tools/inventory.pl >+++ b/tools/inventory.pl >@@ -436,7 +436,7 @@ if ( defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on' ) > qw / biblioitems.title biblio.author > items.barcode items.itemnumber > items.homebranch items.location items.ccode >- items.itemcallnumber items.notforloan >+ items.itemcallnumber items.enumchron items.notforloan > items.itemlost items.damaged > items.withdrawn items.stocknumber > / >@@ -451,7 +451,7 @@ if ( defined $input->param('CSVexport') && $input->param('CSVexport') eq 'on' ) > print $csv->string, "\n"; > > my @keys = >- qw/ title author barcode itemnumber homebranch location ccode itemcallnumber notforloan itemlost damaged withdrawn stocknumber /; >+ qw/ title author barcode itemnumber homebranch location ccode itemcallnumber enumchron notforloan itemlost damaged withdrawn stocknumber /; > for my $item (@$loop) { > my @line; > for my $key (@keys) { >-- >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 38946
:
185786
|
186160