Bug 28372 - Use variables for 007 controlfield translations in MARC21slim2intranetResults.xsl
Summary: Use variables for 007 controlfield translations in MARC21slim2intranetResults...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-18 14:40 UTC by Nick Clemens
Modified: 2023-06-08 22:28 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00


Attachments
Bug 28372: Use variables instead of repeated field lookup (14.14 KB, patch)
2021-05-18 14:43 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28372: Update OPAC results XSLT to use variables for 007 (18.29 KB, patch)
2022-09-21 20:17 UTC, Nick Clemens
Details | Diff | Splinter Review
Screenshot - something went wrong with the OPAC display (113.46 KB, image/png)
2022-09-21 23:21 UTC, David Nind
Details
Bug 28372: Update OPAC results XSLT to use variables for 007 (18.29 KB, patch)
2022-09-22 19:26 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 28372: Use variables instead of repeated field lookup (14.23 KB, patch)
2022-09-22 22:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 28372: Update OPAC results XSLT to use variables for 007 (18.39 KB, patch)
2022-09-22 22:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 28372: Use variables instead of repeated field lookup (14.24 KB, patch)
2022-10-07 10:04 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 28372: Update OPAC results XSLT to use variables for 007 (18.41 KB, patch)
2022-10-07 10:04 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2021-05-18 14:40:05 UTC
Slight performance improvement over fetching the same field every time
Comment 1 Nick Clemens 2021-05-18 14:43:53 UTC
Created attachment 121112 [details] [review]
Bug 28372: Use variables instead of repeated field lookup

This simply replaces repeated lookups of the field with a variable test

To test:
1 - Perform a search on the staff client
2 - Note the 'Format' in the  record results
3 - Apply patch
4 - Repeat search
5 - Confirm Formats are unchanged
Comment 2 Katrin Fischer 2021-06-03 21:06:38 UTC
Hi Nick, this reads well. Could you please change the OPAC results file as well?
Comment 3 Nick Clemens 2022-09-21 20:17:46 UTC
Created attachment 140833 [details] [review]
Bug 28372: Update OPAC results XSLT to use variables for 007

Same test plan as before, but for OPAC
Comment 4 David Nind 2022-09-21 23:21:33 UTC
Created attachment 140839 [details]
Screenshot - something went wrong with the OPAC display

Something is wrong with the OPAC patch - see the screenshot.

No details for a record are shown in the OPAC search results.

The staff interface display is unchanged.
Comment 5 Nick Clemens 2022-09-22 19:26:20 UTC
Created attachment 140859 [details] [review]
Bug 28372: Update OPAC results XSLT to use variables for 007

Same test plan as before, but for OPAC
Comment 6 Nick Clemens 2022-09-22 19:26:56 UTC
(In reply to David Nind from comment #4)
> Created attachment 140839 [details]
> Screenshot - something went wrong with the OPAC display
> 
> Something is wrong with the OPAC patch - see the screenshot.
> 
> No details for a record are shown in the OPAC search results.
> 
> The staff interface display is unchanged.

Should be fixed, forgot to delete one 'if'
Comment 7 David Nind 2022-09-22 22:16:26 UTC
Created attachment 140874 [details] [review]
Bug 28372: Use variables instead of repeated field lookup

This simply replaces repeated lookups of the field with a variable test

To test:
1 - Perform a search on the staff client
2 - Note the 'Format' in the  record results
3 - Apply patch
4 - Repeat search
5 - Confirm Formats are unchanged

Signed-off-by: David Nind <david@davidnind.com>

https://bugs.koha-community.org/show_bug.cgi?id=2837
Comment 8 David Nind 2022-09-22 22:16:31 UTC
Created attachment 140875 [details] [review]
Bug 28372: Update OPAC results XSLT to use variables for 007

Same test plan as before, but for OPAC

Signed-off-by: David Nind <david@davidnind.com>

https://bugs.koha-community.org/show_bug.cgi?id=2837
Comment 9 David Nind 2022-09-22 22:17:08 UTC
(In reply to Nick Clemens from comment #6)
> Should be fixed, forgot to delete one 'if'

Thanks Nick! Now signed off.
Comment 10 Martin Renvoize 2022-10-07 10:04:15 UTC
Created attachment 141484 [details] [review]
Bug 28372: Use variables instead of repeated field lookup

This simply replaces repeated lookups of the field with a variable test

To test:
1 - Perform a search on the staff client
2 - Note the 'Format' in the  record results
3 - Apply patch
4 - Repeat search
5 - Confirm Formats are unchanged

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2022-10-07 10:04:20 UTC
Created attachment 141485 [details] [review]
Bug 28372: Update OPAC results XSLT to use variables for 007

Same test plan as before, but for OPAC

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2022-10-07 10:06:10 UTC
Nice improvement readability wise.. no noticeable change in performance on my part, but I didn't measure it in any meaningful way. I think this is worthwhile for the readability regardless.

Passing QA
Comment 13 Tomás Cohen Arazi 2022-10-12 18:17:54 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!