Bug 14911

Summary: Item search: Display additional title information
Product: Koha Reporter: Theodoros Theodoropoulos <theod>
Component: SearchingAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: david, lucas, marjorie.barry-vila, r.delahunty
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23499
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Improves display of title information in item search by adding subtitle, part name, part number and medium to the display.
Version(s) released in:
23.05.00,22.11.03
Circulation function:
Bug Depends on: 11529    
Bug Blocks:    
Attachments: Bug 14911: Add 245 fields to itemsearch title column
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc

Description Theodoros Theodoropoulos 2015-09-28 11:25:40 UTC
It would be great if additional 245 subfields (for example b, c, k, n, p, s) could also be displayed in Item search results and Serial subscription results (right now only 245a is displayed under the title columns)!
Some -if not all- of these subfields are essential to be shown in order to differentiate the results!

It seems that this exact request has been recently solved for other result pages by changing the XSLT (see http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13381), however because the mechanism used in Item search results and Serial subscription results apparently is different (ie not using XSLTs), special care should be taken to show a 'full' 245 there as well.
Comment 1 Katrin Fischer 2019-01-11 22:03:57 UTC
bcnp would be easy to do with bug 11529.
Comment 2 Ray Delahunty 2019-11-22 09:38:26 UTC
Staff here are also keen to see more fields of the MARC21 245 displayed, not only in the serials-search.pl results, but more generally throughout the acquisitions area. We are waiting to see what comes with 19.11 with the new fields in the biblio table (bug 11529). Is the ease of adding subfields in search results suggested in this bug down to the addition being limited to them displaying rather than them being included in the searching (See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23499)? If inclusion of the additional subfields in the search is complex I think my colleagues would be somewhat happy with having them simply displaying in the search results.
Comment 3 Katrin Fischer 2020-01-08 07:11:26 UTC
Splitting bugs up here - making this one about item search and linking to the existing bug report for serials subscription search in see also.
Comment 4 Lucas Gass (lukeg) 2022-12-01 21:51:58 UTC
Like Katrin said, bcnp are easy because they are now DB fields.
Comment 5 Lucas Gass (lukeg) 2022-12-01 21:59:54 UTC
Created attachment 144385 [details] [review]
Bug 14911: Add 245 fields to itemsearch title column

To test:
1. Have some records that have these 245 fields:

    -Title 245$a
    -Subtitle 245$b
    -Medium 245$h
    -Part number 245$n
    -Part name 245$p

Note: IN KTD I have to run batchRebuildBiblioTables.pl -c

2. Apply patch and do an item search that will turn up items with the 245 fields lists above
3. Notice that those subfields are now included in the title column.

I added them in this manner because it seemed right to be:
-Subfield, included in the title link
-Medium
-Part number
-Part name
Comment 6 Owen Leonard 2022-12-02 12:18:25 UTC
I think biblio-title.inc should be used here instead
Comment 7 Lucas Gass (lukeg) 2022-12-02 17:10:24 UTC
(In reply to Owen Leonard from comment #6)
> I think biblio-title.inc should be used here instead

That is a reasonable request. However, when I attempt to add that include into the JSON include ( itemsearch_item.json.inc ) it crashes! I'm not seeing why or getting an useful errors to help.

It is finding the include but the itemseach page won't properly load.
Comment 8 Katrin Fischer 2022-12-04 12:16:54 UTC
Just a +1 for the efforts here. This would be super helpful.
Comment 9 Lucas Gass (lukeg) 2022-12-08 22:20:45 UTC
Created attachment 144511 [details] [review]
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc

To test:
1. Have some records that have these 245 fields:

    -Title 245$a
    -Subtitle 245$b
    -Medium 245$h
    -Part number 245$n
    -Part name 245$p

Note: IN KTD I have to run batchRebuildBiblioTables.pl -c

2. Apply patch and do an item search that will turn up items with the 245 fields lists above
3. Notice that those subfields are now included in the title column.
Comment 10 David Nind 2022-12-09 14:05:30 UTC
Created attachment 144529 [details] [review]
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc

To test:
1. Have some records that have these 245 fields:

    -Title 245$a
    -Subtitle 245$b
    -Medium 245$h
    -Part number 245$n
    -Part name 245$p

Note: IN KTD I have to run batchRebuildBiblioTables.pl -c

2. Apply patch and do an item search that will turn up items with the 245 fields lists above
3. Notice that those subfields are now included in the title column.

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2022-12-09 14:09:45 UTC
Testing notes (using KTD):

1. Edit the framework used for the items so 245$n and 245$p are visible in the editor.

2. To run misc/batchRebuildBiblioTables.pl -c successfully, I needed to edit record 72 to remove the duplicate 010 field (see bug 30896).
Comment 12 Katrin Fischer 2023-02-03 14:34:51 UTC
This works for the result list, but not for the CSV export. I've filed 

Bug 32879 - Item search: Display additional 245 subfields in CSV export

I tried to provide a follow-up, but: The include used for the result lists adds spans, so we cannot use the same solution for the CSV export easily. 

I think this is still worthwhile as a first step.
Comment 13 Katrin Fischer 2023-02-03 14:37:00 UTC
Created attachment 146147 [details] [review]
Bug 14911: Add 245 fields to itemsearch title column via biblio-title.inc

To test:
1. Have some records that have these 245 fields:

    -Title 245$a
    -Subtitle 245$b
    -Medium 245$h
    -Part number 245$n
    -Part name 245$p

Note: IN KTD I have to run batchRebuildBiblioTables.pl -c

2. Apply patch and do an item search that will turn up items with the 245 fields lists above
3. Notice that those subfields are now included in the title column.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 14 Tomás Cohen Arazi (tcohen) 2023-02-07 13:49:44 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 15 Pedro Amorim 2023-02-09 11:08:06 UTC
Nice work everyone!

Pushed to master for 22.11.x
Comment 16 Lucas Gass (lukeg) 2023-02-15 21:40:14 UTC
Enhancement will not be backported to 22.05.x