Bug 38946 - Add serial enumeration to inventory table
Summary: Add serial enumeration to inventory table
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 24.05
Hardware: All All
: P5 - low enhancement
Assignee: David Cook
QA Contact: Katrin Fischer
URL:
Keywords: release-notes-needed
Depends on:
Blocks: 41126
  Show dependency treegraph
 
Reported: 2025-01-22 15:34 UTC by Benjamin Daeuber
Modified: 2026-03-01 22:25 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This change adds a "Serial enumeration / chronology" column into the inventory results. This is particularly useful when doing inventory/stocktake with serials which share the same call number but have different volume numbers. This new column can be hidden by clicking "Columns" and hiding it or going into table settings.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 38946: Add enumchron to inventory table (4.89 KB, patch)
2025-08-26 07:04 UTC, David Cook
Details | Diff | Splinter Review
Bug 38946: Add enumchron to inventory table (4.96 KB, patch)
2025-09-04 14:27 UTC, Lin Wei
Details | Diff | Splinter Review
Default sort of callnumber (64.05 KB, image/png)
2025-10-27 00:55 UTC, David Cook
Details
Bug 38946: Add enumchron to inventory table (5.01 KB, patch)
2026-02-13 09:47 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Daeuber 2025-01-22 15:34:18 UTC
It would be helpful to add serial enumeration to the outputted inventory table. If you are inventorying a series of items with the same title, but different issue number or years, there's currently no easy way of distinguishing them in the output.
Comment 1 Katrin Fischer 2025-01-22 16:22:02 UTC
+1 :)
Comment 2 David Cook 2025-08-26 06:54:03 UTC
I've had a library asking for this as well. 

The table is already pretty crowded, but it does look doable.
Comment 3 David Cook 2025-08-26 07:04:57 UTC
Created attachment 185786 [details] [review]
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
Comment 4 Lin Wei 2025-09-04 14:27:24 UTC
Created attachment 186160 [details] [review]
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>
Comment 5 Lucas Gass (lukeg) 2025-10-24 14:18:29 UTC
This now sorts by default on the serial enumeration column:

            inventorydt = $("#inventoryt").kohaTable({
                "pagingType": 'full_numbers',
                "bKohaColumnsUseNames": true,
                [% IF uploadedbarcodesflag %]
                    // sort on callnumber
                    "order": [[ 2, "asc" ]],
                [% ELSE %]
                    // first column contains checkboxes
                    "columnDefs": [
                        { "orderable": false, "searchable":  false, "targets": [ 0 ] }
                    ],
                    // 3rd column is callnumber
                    "order": [[ 2, "asc" ]],
                [% END %]
Comment 6 David Cook 2025-10-27 00:54:23 UTC
(In reply to Lucas Gass (lukeg) from comment #5)
> This now sorts by default on the serial enumeration column:
> 
>             inventorydt = $("#inventoryt").kohaTable({
>                 "pagingType": 'full_numbers',
>                 "bKohaColumnsUseNames": true,
>                 [% IF uploadedbarcodesflag %]
>                     // sort on callnumber
>                     "order": [[ 2, "asc" ]],
>                 [% ELSE %]
>                     // first column contains checkboxes
>                     "columnDefs": [
>                         { "orderable": false, "searchable":  false,
> "targets": [ 0 ] }
>                     ],
>                     // 3rd column is callnumber
>                     "order": [[ 2, "asc" ]],
>                 [% END %]

Could you provide a bit more information?

For me, that doesn't appear to be true. It still sorts on callnumber, because callnumber is still the 3rd column with serial enumeration coming after it.

I'll attach a screenshot.
Comment 7 David Cook 2025-10-27 00:55:55 UTC
Created attachment 188453 [details]
Default sort of callnumber
Comment 8 David Cook 2025-10-27 00:58:17 UTC
Going to reset to "Signed Off" since it looks good to me, but happy for you to provide some more info to put it back to Failed QA. Maybe I'm looking on the wrong screen.

I was just following the test plan and it looks good to me?
Comment 9 Katrin Fischer 2026-02-13 09:46:48 UTC
Passes tests, can be hidden, will make it much easier to use the tool for some libraires. I like!
Comment 10 Katrin Fischer 2026-02-13 09:47:14 UTC
Created attachment 193040 [details] [review]
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 11 Lucas Gass (lukeg) 2026-02-27 18:40:29 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 12 Lucas Gass (lukeg) 2026-02-27 18:42:37 UTC
David, a new column warrants release notes in my opinion. Do you mind adding them?
Comment 13 David Cook 2026-03-01 22:24:23 UTC
(In reply to Lucas Gass (lukeg) from comment #12)
> David, a new column warrants release notes in my opinion. Do you mind adding
> them?

Sure thing!