Bug 29314

Summary: Move some OpenURL code to Koha::Biblio
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: julian.maurice, martin.renvoize, tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 11175    
Bug Blocks:    
Attachments: Bug 29314: Move OpenURL code from XSLT to Koha::Biblio

Description Marcel de Rooy 2021-10-25 10:41:14 UTC

    
Comment 1 Marcel de Rooy 2021-10-25 12:20:43 UTC
Created attachment 126822 [details] [review]
Bug 29314: Move OpenURL code from XSLT to Koha::Biblio

We need to pass the xslt variable OpenURLResolverURL in a few
opac code locations: opac detail, results (via C4), shelves and
tags.

The logic with itemtypes is moved to Koha::Biblio.

Added a few trivial tests.

Test plan:
Inspect web page and look for OpenURL when enabled (opac detail
and results).
Run t/db_dependent/Koha/Biblio.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 2 Marcel de Rooy 2021-10-25 12:21:04 UTC
Julian, could you please have a look?
Comment 3 Martin Renvoize (ashimema) 2021-10-27 08:12:00 UTC
Looks reasonable to me.. but I'll defer to Julian for initial testing as I think he's closer to coins and openurl than I am
Comment 4 Marcel de Rooy 2021-12-17 09:21:22 UTC
ping Julian
Comment 5 Tomás Cohen Arazi (tcohen) 2022-04-20 12:38:48 UTC
I would like to know what the overall goal is. As I see it, we are making the callers need to pass the OpenURLResolverURL variable, instead of taking it for granted implicitly.

I'm failing it because it makes some tests fail:

t/db_dependent/Search.t ..........     # Looks like you planned 90 tests but ran 27.
t/db_dependent/Search.t .......... 1/3 
#   Failed test 'MARC21 + DOM'
#   at t/db_dependent/Search.t line 906.
Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/Search.pm line 1994.
# Looks like your test exited with 255 just after 1.
Comment 6 Marcel de Rooy 2022-10-19 11:32:20 UTC
Closing this report. Noting that I was kind of amazed that Julian did never respond at all.