Bug 33957 - normalized_oclc not defined in opac-user.tt
Summary: normalized_oclc not defined in opac-user.tt
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Nick Clemens (kidclamp)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-08 11:15 UTC by Nick Clemens (kidclamp)
Modified: 2023-12-28 20:47 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.02,22.11.08
Circulation function:


Attachments
Bug 33957: Add normalized_oclc and only fetch when needed (2.72 KB, patch)
2023-06-08 11:20 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 33957: Add normalized_oclc and only fetch when needed (2.82 KB, patch)
2023-06-08 13:46 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2023-06-08 11:15:21 UTC
Similar to bug 33951
Comment 1 Nick Clemens (kidclamp) 2023-06-08 11:20:33 UTC
Created attachment 152160 [details] [review]
Bug 33957: Add normalized_oclc and only fetch when needed

opac-user.tt wants to normalized_oclc number if using syndetics or B&T images

We don't need to fetch it if not, but we need to pass it if so

To test:
1 - Switch all Syndetics prefs to 'Show' or 'Use' except
    SyndeticsClientCode = just enter 'test'
2 - Checkout some items to a patron, ensure the records have:
    - ISBN
    - UPC
    - OCLC number
3 - View opac-user.pl (sign in to opac as the user)
4 - View the network console tab (may need to reload)
5 - Note requests like:
    https://secure.syndetics.com/index.aspx?isbn=1780335792/MC.GIF&client=test&type=xw10&upc=&oclc=
6 - Note that oclc parameter is not filled for record with an oclc number
7 - Apply patch
8 - Reload
9 - Confirm the link now has oclc as expected
10 - Disable syndetics, enable google books or another source
11 - Confirm images display as expected
Comment 2 Jonathan Druart 2023-06-08 13:46:56 UTC
Created attachment 152193 [details] [review]
Bug 33957: Add normalized_oclc and only fetch when needed

opac-user.tt wants to normalized_oclc number if using syndetics or B&T images

We don't need to fetch it if not, but we need to pass it if so

To test:
1 - Switch all Syndetics prefs to 'Show' or 'Use' except
    SyndeticsClientCode = just enter 'test'
2 - Checkout some items to a patron, ensure the records have:
    - ISBN
    - UPC
    - OCLC number
3 - View opac-user.pl (sign in to opac as the user)
4 - View the network console tab (may need to reload)
5 - Note requests like:
    https://secure.syndetics.com/index.aspx?isbn=1780335792/MC.GIF&client=test&type=xw10&upc=&oclc=
6 - Note that oclc parameter is not filled for record with an oclc number
7 - Apply patch
8 - Reload
9 - Confirm the link now has oclc as expected
10 - Disable syndetics, enable google books or another source
11 - Confirm images display as expected

JD amended patch: tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Tomás Cohen Arazi (tcohen) 2023-06-09 11:43:04 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 4 Martin Renvoize (ashimema) 2023-07-12 08:24:32 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 5 Matt Blenkinsop 2023-07-12 09:36:32 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x