Bug 31020 - PassItemMarcToXSLT only applies on results pages
Summary: PassItemMarcToXSLT only applies on results pages
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Victor Grousset/tuxayo
URL:
Keywords:
Depends on: 28373
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-23 01:04 UTC by Fridolin Somers
Modified: 2023-06-08 22:26 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the note about the PassItemMarcToXSLT system preference so that it is only shown for the OPACXSLTResultsDisplay and XSLTResultsDisplay system preferences - it was appearing in all XSLT system preferences, when it only applies for results pages. (The note is removed from OPACXSLTListsDisplay, XSLTListsDisplay, OPACXSLTDetailsDisplay, and XSLTDetailsDisplay system preferences.)
Version(s) released in:
22.11.00, 22.05.05, 21.11.12
Circulation function:


Attachments
Bug 31020: Fix PassItemMarcToXSLT in system preferences description (8.22 KB, patch)
2022-06-23 01:14 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 31020: Fix PassItemMarcToXSLT in system preferences description (8.27 KB, patch)
2022-06-23 01:53 UTC, David Nind
Details | Diff | Splinter Review
Bug 31020: Fix PassItemMarcToXSLT in system preferences description (8.33 KB, patch)
2022-07-11 21:41 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2022-06-23 01:04:22 UTC
Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search : 
 > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');

I've tested by adding in all XSLT files :
  <strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.

In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.

PS :
Maybe it will be good to have separate preferences for OPAC and staff interface.
Comment 1 Fridolin Somers 2022-06-23 01:14:08 UTC
Created attachment 136435 [details] [review]
Bug 31020: Fix PassItemMarcToXSLT in system preferences description

Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search :
 > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');

I've tested by adding in all XSLT files :
  <strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.

In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.

This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about
MARC datas not item tags build in XML recieved by XSLT.

Test plan :
1) Apply patch
2) Search for PassItemMarcToXSLT in system preferencies
3) Look at description of PassItemMarcToXSLT
4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay
Comment 2 David Nind 2022-06-23 01:53:04 UTC
Created attachment 136436 [details] [review]
Bug 31020: Fix PassItemMarcToXSLT in system preferences description

Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search :
 > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');

I've tested by adding in all XSLT files :
  <strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.

In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.

This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about
MARC datas not item tags build in XML recieved by XSLT.

Test plan :
1) Apply patch
2) Search for PassItemMarcToXSLT in system preferencies
3) Look at description of PassItemMarcToXSLT
4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Victor Grousset/tuxayo 2022-07-11 21:41:41 UTC
Created attachment 137592 [details] [review]
Bug 31020: Fix PassItemMarcToXSLT in system preferences description

Bug 28373 added system preference PassItemMarcToXSLT is referenced is all XSLT system preferences.
But it only applies on results pages.
The only use in perl code is in C4::Search :
 > $marcrecord->delete_fields( @fields ) unless C4::Context->preference('PassItemMarcToXSLT');

I've tested by adding in all XSLT files :
  <strong>ITEMS <xsl:value-of select="count(marc:datafield[@tag=952])"/> </strong>
Number of items only appears in OPAC and staff interface results pages.

In fact only search pages get MARC record from search engine, in which items datas have been embedded for indexing.
In other pages MARC record does not embed items datas.

This patch adds "MARC21 952, UNIMARC 995" to be explicit we talk about
MARC datas not item tags build in XML recieved by XSLT.

Test plan :
1) Apply patch
2) Search for PassItemMarcToXSLT in system preferencies
3) Look at description of PassItemMarcToXSLT
4) Check PassItemMarcToXSLT only apprears in OPACXSLTResultsDisplay and XSLTResultsDisplay

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 4 Victor Grousset/tuxayo 2022-07-11 21:47:03 UTC
Works, qa script happy, code looks good, passing QA :)
Comment 5 Tomás Cohen Arazi (tcohen) 2022-07-20 13:00:03 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 6 Lucas Gass (lukeg) 2022-08-23 19:52:43 UTC
Backported to 22.05.x for 22.05.05
Comment 7 Arthur Suzuki 2022-08-30 09:28:45 UTC
thx pushed to 21.11.x for 21.11.12
Comment 8 Victor Grousset/tuxayo 2022-09-14 19:29:20 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.