Bug 37995

Summary: (Bug 29948 follow-up) Make display author information more configurable
Product: Koha Reporter: Janusz Kaczmarek <januszop>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: jonathan.druart, schodkowy.omegi-0r
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36795
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38425
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 29948    
Bug Blocks:    

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.