Bugzilla – Attachment 186160 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.96 KB, created by
Lin Wei
on 2025-09-04 14:27:24 UTC
(
hide
)
Description:
Bug 38946: Add enumchron to inventory table
Filename:
MIME Type:
Creator:
Lin Wei
Created:
2025-09-04 14:27:24 UTC
Size:
4.96 KB
patch
obsolete
>From b016833c87a38899ab6201df60a0ecb3a6d915a1 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 > >Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> >--- > 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 2c22518dc5b..67c381e2560 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 368bd08b113..c2c4a1652e0 100644 >--- a/admin/columns_settings.yml >+++ b/admin/columns_settings.yml >@@ -2657,6 +2657,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 ba68b0eb975..a01b8e90d89 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 86ccfb340d8..6346987b3be 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.43.0
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