Bug 23663

Summary: Itemtype summary feature in search results is only used in deprecated opac results non-xslt view
Product: Koha Reporter: Nick Clemens <nick>
Component: SearchingAssignee: Nick Clemens <nick>
Status: CLOSED FIXED QA Contact: Martin Renvoize <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, katrin.fischer, martin.renvoize
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17598
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12561
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Attachments: Bug 23663: Only process itemtype summary if using non-xslt opac results
Bug 23663: Only process itemtype summary if using non-xslt opac results
Bug 23663: Only process itemtype summary if using non-xslt opac results

Description Nick Clemens 2019-09-21 11:33:10 UTC
There is a stanza in searchResults that was commented as being unused - it appears to still be used in one scenario.

If we don't wish to remove the non-xslt view for opac results at this time we can at least prevent some processing
Comment 1 Nick Clemens 2019-09-21 11:39:10 UTC
Created attachment 93085 [details] [review]
Bug 23663: Only process itemtype summary if using non-xslt opac results

To test:
1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view
2 - In Administration->Itemtypes define a summary for an itemtype:
    This is the summary for [245a]
3 - Perform a search on the opac that will return results with this itemtype
4 - Note "This is the summary" appears in results with the title
5 - Set OPACXSLTResultsDisplay to 'default'
6 - Refresh your search results, note the summary disappears
7 - Try search in other places and note that summary never appears
8 - Apply patch
9 - Repeat 1-7 and note nothing changed
Comment 2 Katrin Fischer 2019-09-24 05:31:37 UTC
Note: you also need to have an itemtype on record level. And there are some display issues witht he feature, it will print out line breaks (filters suspected):
 The Thirty Years War :<br/>
Comment 3 Katrin Fischer 2019-09-24 05:32:12 UTC
Created attachment 93135 [details] [review]
Bug 23663: Only process itemtype summary if using non-xslt opac results

To test:
1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view
2 - In Administration->Itemtypes define a summary for an itemtype:
    This is the summary for [245a]
3 - Perform a search on the opac that will return results with this itemtype
4 - Note "This is the summary" appears in results with the title
5 - Set OPACXSLTResultsDisplay to 'default'
6 - Refresh your search results, note the summary disappears
7 - Try search in other places and note that summary never appears
8 - Apply patch
9 - Repeat 1-7 and note nothing changed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Jonathan Druart 2019-10-14 12:56:08 UTC
What about removing the code?
Comment 5 Nick Clemens 2019-10-15 12:52:38 UTC
(In reply to Jonathan Druart from comment #4)
> What about removing the code?

I think that can be done, but separately, here we just don't process it unnecessarily

The feature is a little bit interesting, and could be used in the future, but I think removal is its own bug
Comment 6 Martin Renvoize 2019-10-29 11:22:34 UTC
Created attachment 94827 [details] [review]
Bug 23663: Only process itemtype summary if using non-xslt opac results

To test:
1 - Set OpacXSLTResultsDisplay to "" to use non-xslt view
2 - In Administration->Itemtypes define a summary for an itemtype:
    This is the summary for [245a]
3 - Perform a search on the opac that will return results with this itemtype
4 - Note "This is the summary" appears in results with the title
5 - Set OPACXSLTResultsDisplay to 'default'
6 - Refresh your search results, note the summary disappears
7 - Try search in other places and note that summary never appears
8 - Apply patch
9 - Repeat 1-7 and note nothing changed

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 7 Martin Renvoize 2019-10-29 11:23:21 UTC
Good sleuthing there Nick,

Patch works as expected.. and I agree it would be nice to remove the code block entirely, but in a new bug.

Passing QA
Comment 8 Martin Renvoize 2019-10-29 12:17:04 UTC
Nice work!

Pushed to master for 19.11.00