Bug 5927

Summary: Show series information in search results page
Product: Koha Reporter: Shelley <shelley>
Component: OPACAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: enhancement    
Priority: P5 - low CC: amit.gupta, amitddng135, arm, dschust1, holsen, jonathan.druart, nick, rogan.hamby, viktor.sarge
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00
Circulation function:
Bug Depends on:    
Bug Blocks: 15436, 29556, 30231    
Attachments: patch to display 440$a a nd 490$a in results
patch to add 440 and 490 $a and $v to search results
Bug 5927: Show series information in Search results page
patch to add 440 and 490 $a and $v to search results
Bug 5927: Show series information in OPAC search results.
Bug 5927: Show series information in staff search results page.
Bug 5927: Show series information in staff search results page.
Bug 5927: [Alternate] Show series information in staff and opac results pages
Bug 5927: [Alternate] Show series information in staff and opac results pages
Bug 5927: (QA follow-up) Move part template below show-series to make both *Utils.xsl match

Description Shelley 2011-03-22 00:22:51 UTC
Currently, in the staff client, if you search a book in a series, and the series information is included in the 490 fields, it displays at the end of the title in the search results. 

However, in the OPAC, the search screen does not display what series or volume in the series the book is. 

Show the series and volume info on a separate line in OPAC search results

Edit the staff search results to do so, as well (currently only volume).
Comment 1 Nicole C. Engard 2014-12-15 16:55:27 UTC
I have libraries that would also like to see the series info displayed in both the staff and OPAC results/details.

Nicole
Comment 2 Katrin Fischer 2015-04-05 23:27:14 UTC
Is this still valid? Which fields are missing where?
Comment 3 Nicole C. Engard 2015-04-06 01:49:45 UTC
I believe it's the 490 field and subfields.
Comment 4 Viktor Sarge 2016-12-28 11:40:34 UTC
I do get the series in the facets which is good enough to me personally. However - I'd still gladly remove translator from the headline in search results and add series information instead.
Comment 5 Katrin Fischer 2019-06-14 08:04:22 UTC
We just received a ticket wishing for this as well. Still valid.
Comment 6 Rogan Hamby 2020-08-24 19:51:20 UTC
Created attachment 109033 [details] [review]
patch to display 440$a a nd 490$a in results
Comment 7 Rogan Hamby 2020-08-25 12:56:50 UTC
Just realized I left the $v out which was unintended.  New patch coming in a moment.
Comment 8 Rogan Hamby 2020-08-25 13:01:53 UTC
Created attachment 109070 [details]
patch to add 440 and 490 $a and $v to search results
Comment 9 Agnes Rivers-Moore 2020-08-25 14:20:46 UTC
Thank you Rogan! This will be a great improvement. Our observation is that the series from either 440 or 490 was not showing in staff client or OPAC (Koha ver 19.11).
Please also make the series show regardless of language selected.
Comment 10 Rogan Hamby 2020-08-25 14:28:45 UTC
Hi Agnes,

This change is specific to the OPAC not staff client search results.  Also, I'm familiar with your system and depending on the library searching you may need to reset plack.
Comment 11 Agnes Rivers-Moore 2020-08-25 14:42:22 UTC
Hi Rogan - Agreed this bug is about the OPAC. I only meant to mention that the Shelley's original context of the bug said series showed in the staff client but not in OPAC. Now it does not show in either interface.
Comment 12 Amit Gupta 2020-08-25 14:53:58 UTC
Created attachment 109106 [details] [review]
Bug 5927: Show series information in Search results page

To test:
1. Create a catalog records with 440 and 490 MARC21 fields.
2. Search the result in staff page and you will not able to see Series in the search result page.
3. Apply the patch
4. Refresh the page.
5. Now you can able to see Series in the staff search result page.
6. This patch will handle multiple 440 and 490 fields in the search result page.
Comment 13 Amit Gupta 2020-08-25 14:57:09 UTC
(In reply to Rogan Hamby from comment #8)
> Created attachment 109070 [details]
> patch to add 440 and 490 $a and $v to search results

Hi

I have checked your patch and it will not handle multiple 440 and 490 tag in the OPAC search result page. 

I have created for staff search result page. Can you look into the same.

Meanwhile I will correct your patch and resubmit.
Comment 14 Rogan Hamby 2020-08-25 15:37:31 UTC
Hi Amit,

Thank you for the feedback.  I can see where it's  not correctly providing delimiters between the multiple series statements.  I'll borrow from your example and re-submit.  Thanks!
Comment 15 Amit Gupta 2020-08-25 15:38:49 UTC
(In reply to Rogan Hamby from comment #14)
> Hi Amit,
> 
> Thank you for the feedback.  I can see where it's  not correctly providing
> delimiters between the multiple series statements.  I'll borrow from your
> example and re-submit.  Thanks!

I created the patch and set you as commit author. Will submit in 10 minutes.
Comment 16 Rogan Hamby 2020-08-25 15:40:26 UTC
Created attachment 109115 [details] [review]
patch to add 440 and 490 $a and $v to search results
Comment 17 Amit Gupta 2020-08-25 15:57:12 UTC
Created attachment 109118 [details] [review]
Bug 5927: Show series information in OPAC search results.

Test plan:
1. Simply search for any records with a 440 or 490 (subfields $a and $v) and they will appear on the search results
2. This patch will handle to show both 440 and 490 fields (subfields $a and $v) in the OPAC search result page.
Comment 18 Amit Gupta 2020-08-25 15:58:08 UTC
Created attachment 109119 [details] [review]
Bug 5927: Show series information in staff search results page.

To test:
1. Create a catalog records with 440 and 490 ($a and $v subfield) MARC21 fields.
2. Search the result in staff page and you will not able to see Series in the search result page.
3. Apply the patch
4. Refresh the page.
5. Now you can able to see Series in the staff search result page.
6. This patch will handle to show both 440 and 490 ($a and $v subfield) fields in the search result page.
Comment 19 Alexis Ripetti 2020-09-08 15:16:39 UTC
Created attachment 109757 [details] [review]
Bug 5927: Show series information in staff search results page.

To test:
1. Create a catalog records with 440 and 490 ($a and $v subfield) MARC21 fields.
2. Search the result in staff page and you will not able to see Series in the search result page.
3. Apply the patch
4. Refresh the page.
5. Now you can able to see Series in the staff search result page.
6. This patch will handle to show both 440 and 490 ($a and $v subfield) fields in the search result page.

Signed-off-by: Alexis Ripetti <alexis.ripetti@inLibro.com>
Comment 20 Nick Clemens (kidclamp) 2020-09-11 18:47:48 UTC
Created attachment 109968 [details] [review]
Bug 5927: [Alternate] Show series information in staff and opac results pages

This moves the series info to a template in the XSLT utils files and adds a
few variables to make it work right.

To test:
1 - Create a catalog records with:
    440 series fields
    490 traced series fields
    490 untraced series fields
2 - View the details pages for these records and note the display and the links formed
3 - Apply patch
4 - Confirm the details pages look the same
5 - Search on staff and opac to return the records
6 - Confirm the results pages form the same series as on details
7 - Confirm the links work the same
Comment 21 Nick Clemens (kidclamp) 2020-09-11 18:49:08 UTC
The patches here work, but they don't take into account the logic of 490/800/830

Rather than add new code, I suggest moving the code on the details page into the utilities and calling it as a template on results and details.

I supplied a new patch for testing. If you agree I think we should obsolete the old patches.

-Nick
Comment 22 Katrin Fischer 2020-09-12 21:22:01 UTC
Created attachment 109995 [details] [review]
Bug 5927: [Alternate] Show series information in staff and opac results pages

This moves the series info to a template in the XSLT utils files and adds a
few variables to make it work right.

To test:
1 - Create a catalog records with:
    440 series fields
    490 traced series fields
    490 untraced series fields
2 - View the details pages for these records and note the display and the links formed
3 - Apply patch
4 - Confirm the details pages look the same
5 - Search on staff and opac to return the records
6 - Confirm the results pages form the same series as on details
7 - Confirm the links work the same

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 23 Katrin Fischer 2020-09-12 21:22:06 UTC
Created attachment 109996 [details] [review]
Bug 5927: (QA follow-up) Move part template below show-series to make both *Utils.xsl match

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Katrin Fischer 2020-09-12 21:22:59 UTC
I believe that Nick's approach here is better keeping the logic between details page and results page the same.
Comment 25 Jonathan Druart 2020-09-30 14:04:49 UTC
Rogan, could you test Nick's approach and confirm it works for you?
Comment 26 Rogan Hamby 2020-10-01 20:08:21 UTC
Absolutely, time is short but on review it looks good and before the weekend I will install it on a test vm and provide feedback here.
Comment 27 Rogan Hamby 2020-10-02 14:15:55 UTC
Okay, I can confirm these patches are working for me as expected.
Comment 28 Jonathan Druart 2020-10-08 14:19:55 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 29 Hannah Olsen 2021-11-02 20:30:01 UTC
Hi, what about the 800/830, where the authorized form of series resides? That's the info that we need in search results. The 490s we have are half junk that we put in so that the 800/830s would display (there's a separate bug about that issue).
Comment 30 Katrin Fischer 2021-11-02 21:10:12 UTC
(In reply to Hannah Olsen from comment #29)
> Hi, what about the 800/830, where the authorized form of series resides?
> That's the info that we need in search results. The 490s we have are half
> junk that we put in so that the 800/830s would display (there's a separate
> bug about that issue).

If you have a 490 that is marked as "traced" the 800/830 will show. Koha assumes that for traced series pairs of 490/8xx will be catalogued.