Bug 29314 - Move some OpenURL code to Koha::Biblio
Summary: Move some OpenURL code to Koha::Biblio
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 11175
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-25 10:41 UTC by Marcel de Rooy
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

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


Attachments
Bug 29314: Move OpenURL code from XSLT to Koha::Biblio (8.76 KB, patch)
2021-10-25 12:20 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.