Bug 37995 - (Bug 29948 follow-up) Make display author information more configurable
Summary: (Bug 29948 follow-up) Make display author information more configurable
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 29948
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-24 10:43 UTC by Janusz Kaczmarek
Modified: 2024-12-11 14:33 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2024-09-24 10:43:07 UTC
There is a problem with displaying author's identifiers while OPACAuthorIdentifiersAndInformation is on for 024$2$a.  At the current, the list of identifiers source is closed and hardcoded.  So if it happens that in an authority record a 024 field exists with $2 from outside the list (like wikidata or other from the official list https://www.loc.gov/standards/sourcelist/standard-identifier.html), an empty bullet with no information is being displayed. 

This could be corrected either by filtering out the 024 fields in Koha::Authority::get_identifiers_and_information, or by correcting the template (authority-information.inc).  However, this would only be a halfway solution.  

A more appropriate solution might be to introduce a sub-preference containing the triplets: source code ($2), label, URI prefix.  E.g.: wikidata, Wikidata, http://www.wikidata.org/wiki/
Comment 1 Michał 2024-12-11 14:33:03 UTC
Furthermore, identifiers of type "uri" in $2 (and then actual URL in $a) could be displayed as links by default (provided their scheme is http:// or https://).

It's also worth pointing out that sub get_identifiers_and_information only looks into $2 and $a, meanwhile optional $1 designated for "Real World Object URI" now also exists, which could be used for fallback display/linking of unsupported identifiers if desired, moving the URL generation from the template to that function instead.

It also appears that the subtest 'get_identifiers_and_information' uses $6 instead of $1 for the URI, which seems to be erroneous too.