For research publications some information about authors could be displayed, like ORCID or SCOPUS ids with a link to the corresponding website.
Created attachment 129816 [details] [review] Bug 29897: Rename get_marc_authors with get_marc_contributors get_marc_authors actually return authors from 700..712, not the first author from 200 Sponsored-by: Orex Digital
Created attachment 129817 [details] [review] Bug 29897: Move code to private method for reusability Sponsored-by: Orex Digital
Created attachment 129818 [details] [review] Bug 29897: Add new pref OPACAuthorIdentifiers Sponsored-by: Orex Digital
Created attachment 129819 [details] [review] Bug 29897: Display author's identifiers This new enhancement add the capability to list the different identifiers of authors. It is helpful for research publications for instance. This patch will add a new "Author identifiers" tab on the detail page (OPAC) of a bibliographic record, with the list of the authors and their identifiers. On the detail page of the authority record, the same identifier list will be displayed. Test plan: Create some authority with 024 $a source $2 number $6 link to the source With the pref turned ON you will be able to see the new information. Sponsored-by: Orex Digital
The goal of these patches is to adapt the code from https://gitlab.com/sibeprod/datosautores to Koha core. It can be viewed there: https://biblioteca.ecosur.mx/cgi-bin/koha/opac-authoritiesdetail.pl?authid=12374 https://biblioteca.ecosur.mx/cgi-bin/koha/opac-detail.pl?biblionumber=10794 To be integrated correctly into Koha I have decided to add the identifiers in a new tab, but this can be adjusted if someone has a better suggestion. Also I am suggesting to deal with other author's information from 371, 372, 373 (email, activity, etc.) on a separate bug report.
Bug 29897 - Display author identifiers for researchers 129816 - Bug 29897: Rename get_marc_authors with get_marc_contributors 129817 - Bug 29897: Move code to private method for reusability 129818 - Bug 29897: Add new pref OPACAuthorIdentifiers 129819 - Bug 29897: Display author's identifiers Applying: Bug 29897: Rename get_marc_authors with get_marc_contributors Using index info to reconstruct a base tree... M Koha/Biblio.pm M basket/basket.pl M basket/sendbasket.pl M opac/opac-basket.pl M opac/opac-sendbasket.pl M opac/opac-sendshelf.pl M t/db_dependent/Koha/Biblio.t M virtualshelves/sendshelf.pl Falling back to patching base and 3-way merge... Auto-merging virtualshelves/sendshelf.pl Auto-merging t/db_dependent/Koha/Biblio.t CONFLICT (content): Merge conflict in t/db_dependent/Koha/Biblio.t Auto-merging opac/opac-basket.pl Auto-merging basket/basket.pl Auto-merging Koha/Biblio.pm CONFLICT (content): Merge conflict in Koha/Biblio.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 29897: Rename get_marc_authors with get_marc_contributors [33mhint: Use 'git am --show-current-patch=diff' to see the failed patch[m When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-29897-Rename-getmarcauthors-with-getmarccontri-5Xn3sp.patch Apply? [(y)es, (n)o, (i)nteractive] DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_29897.pl [10:24:08]: Bug 29897 - Add new system preference OPACAuthorIdentifiers
The patches apply on current master.
I am not able to apply the patch in any sandboxes available Bug 29897 - Display author identifiers for researchers 129816 - Bug 29897: Rename get_marc_authors with get_marc_contributors 129817 - Bug 29897: Move code to private method for reusability 129818 - Bug 29897: Add new pref OPACAuthorIdentifiers 129819 - Bug 29897: Display author's identifiers fatal: previous rebase directory .git/rebase-apply still exists but mbox given. Patch left in /tmp/Bug-29897-Rename-getmarcauthors-with-getmarccontri-4JmoX6.patch Apply? [(y)es, (n)o, (i)nteractive] sorry :(
Have you tried to add it to a freshly created instance on a sandbox or reusing one? It reads a little bit like some patch before those might have failed to apply.
Created attachment 132961 [details] [review] Bug 29897: Rename get_marc_authors with get_marc_contributors get_marc_authors actually return authors from 700..712, not the first author from 200 Sponsored-by: Orex Digital
Created attachment 132962 [details] [review] Bug 29897: Move code to private method for reusability Sponsored-by: Orex Digital
Created attachment 132963 [details] [review] Bug 29897: Add new pref OPACAuthorIdentifiers Sponsored-by: Orex Digital
Created attachment 132964 [details] [review] Bug 29897: Display author's identifiers This new enhancement add the capability to list the different identifiers of authors. It is helpful for research publications for instance. This patch will add a new "Author identifiers" tab on the detail page (OPAC) of a bibliographic record, with the list of the authors and their identifiers. On the detail page of the authority record, the same identifier list will be displayed. Test plan: Create some authority with 024 $a source $2 number $6 link to the source With the pref turned ON you will be able to see the new information. Sponsored-by: Orex Digital
The basic functionality is there and it is awesome, good job! however there are some minor issues to fix At bibliographic level: I do not think it will available, yet https://opac-bug29897.sandboxes.biblibre.eu/cgi-bin/koha/opac-detail.pl?biblionumber=439 Inside Authorities identifiers tab a) None Links are functional: https://opac-bug29897.sandboxes.biblibre.eu/cgi-bin/koha/https%3A%2F%2Fwww.scopus.com%2Fauthid%2Fdetail.uri%3FauthorId%3D670165077 b) Tag 110 is not included in Authorities identifiers tab At authority level: https://opac-bug29897.sandboxes.biblibre.eu/cgi-bin/koha/opac-authoritiesdetail.pl?authid=1708 a) Only orcid link is published, all other identifiers are published without the link
Created attachment 133081 [details] [review] Bug 29897: Fix linkage
Thanks Hugo! This last patch should fix the problems you found.
I've applied it on the sandbox.
Thanks, have you seen this bug? b) Tag 110 is not included in Authorities identifiers tab? however tag 710 is included, but not 110 thanks you in advance
(In reply to Hugo Agud from comment #18) > Thanks, have you seen this bug? > > b) Tag 110 is not included in Authorities identifiers tab? > > however tag 710 is included, but not 110 > > thanks you in advance I don't know if it's a bug. We are returning 700..712 and 100. That's the current behaviour in Koha to retrieve authors.
then it could be a more general bug, however this patch, does, what it suppouse to do in a very smart and beatiful way. the only it could be target blank in the url, but it works very fine!
Created attachment 133113 [details] [review] Bug 29897: Rename get_marc_authors with get_marc_contributors get_marc_authors actually return authors from 700..712, not the first author from 200 Sponsored-by: Orex Digital Signed-off-by: Orex Digital <info@orex.es>
Created attachment 133114 [details] [review] Bug 29897: Move code to private method for reusability Sponsored-by: Orex Digital Signed-off-by: Orex Digital <info@orex.es>
Created attachment 133115 [details] [review] Bug 29897: Add new pref OPACAuthorIdentifiers Sponsored-by: Orex Digital Signed-off-by: Orex Digital <info@orex.es>
Created attachment 133116 [details] [review] Bug 29897: Display author's identifiers This new enhancement add the capability to list the different identifiers of authors. It is helpful for research publications for instance. This patch will add a new "Author identifiers" tab on the detail page (OPAC) of a bibliographic record, with the list of the authors and their identifiers. On the detail page of the authority record, the same identifier list will be displayed. Test plan: Create some authority with 024 $a source $2 number $6 link to the source With the pref turned ON you will be able to see the new information. Sponsored-by: Orex Digital Signed-off-by: Orex Digital <info@orex.es>
Created attachment 133117 [details] [review] Bug 29897: Fix linkage Signed-off-by: Orex Digital <info@orex.es>
I'd really love to have this feature, but going through the code sadly found a bigger issue with the specification :( I am making this 0) now, although I caught it last at the bottom of the source tree: 0) Linkage $6 In your code you assume that $6 is a URL, but that will NEVER be the case according to MARC standard. $6 is a very specialized field that will never contain a URL. Linkage here means 'linking MARC fields within the record'. For example it is used to link an original script tag with the corresponding tag in transliteration. See: https://www.loc.gov/marc/authority/ecadcntf.html So I don't think we can push this as is. :( If at all, a link would probably be in $1, but that's a quite new field and quite unlikely. I think our best bet for a universally working feature right now is to buidl the URLs to the corresponding portals using the cataloged IDs form $a ourselves. This also means, that we should limit our efforts on a short list of $2 codes for now. The 4 you have in there would be fine with me. We could add others later. We should also limit $2 display to the ones we have implemented and checked, some are just not useful to patrons. 1) Missing POD for _get_marc_authors Could it be a little confusing having _get_marc_authors and get_marc_authors? 2) On get_marc_contributurs, you write: (700..712 for MARC21) but: + if ( $marcflavour eq "UNIMARC" ) { + $mintag = "700"; + $maxtag = "712"; + $fields_filter = '7..'; + } else { # marc21/normarc + $mintag = "700"; + $maxtag = "720"; + $fields_filter = '7..'; + } Overall using a range instead of a list seems a little risky, but works for MARC21. It looks like a lot of fields, but actually it's only: 700, 710, 711 and 720. (https://www.loc.gov/marc/bibliographic/bd70x75x.html) 3) Missing 110, 111 If we get 710 and 711 we should probably include 110 and 111 in get_marc_authors as well. As it was 'wrong' before, should we file a separate bug report to extend this method? 4) Pref description I am struggling a bit with the description. [Display|Don't display] author identifiers for research publications. It makes it sound, like it was limited to research publications, while the limit is actually the 024 existing or not. Adding information that this requires authorities and 024 would be good I think. Maybe: [Display|Don't display] identifiers for authors and contributors to the detail pages in the OPAC. This feature requires authorities with 024 5) Selection of $2 + [% CASE 'orcid' %]ORCID: + [% CASE 'scopus' %]ScopusID: + [% CASE 'loop' %]loop: + [% CASE 'rid' %]Publons: a) Should these be surrounded by <span>? b) $2 are usually taken from the official LOC list: https://www.loc.gov/standards/sourcelist/standard-identifier.html orcid = ORCID OK scopus = ScopusID OK loop = doesn't exist in official list. I am fine with it if that is a custom one, but maybe worth checking? rid = ResearcherID, linking to: http://www.researcherid.com/#rid-for-researchers, stating: ResearcherID profiles moved to Publons on 15 April 2019 - so probably OK viaf might be a good candidate (for another bug). The fallback worries me: [% CASE %][% identifier.source | html %]: I think we should stick with a hardcoded list as not all $2 codes and identifiers are useful to patrons (and they might get into the catalog, if you use a central authority file) c) I'd also suggest to add a class with the $2 to the <li> element, this way each entry could be hidden and customized easily.
Created attachment 134459 [details] [review] Bug 29897: Don't use $6 for linkage but build the link instead See comment 26: $6 is a very specialized field that will never contain a URL. Linkage here means 'linking MARC fields within the record'. For example it is used to link an original script tag with the corresponding tag in transliteration. See: https://www.loc.gov/marc/authority/ecadcntf.html Sponsored-by: Orex Digital
Created attachment 134460 [details] [review] Bug 29897: Add and fix POD Sponsored-by: Orex Digital
Created attachment 134461 [details] [review] Bug 29897: Improve syspref's description Sponsored-by: Orex Digital
Created attachment 134462 [details] [review] Bug 29897: Add VIAF Sponsored-by: Orex Digital
Created attachment 134463 [details] [review] Bug 29897: Move the identifier list to an include file Sponsored-by: Orex Digital
Created attachment 134464 [details] [review] Bug 29897: Don't display identifier if not in the list Requested by QA, see comment 26. Sponsored-by: Orex Digital
(In reply to Katrin Fischer from comment #26) Thanks for your time, Katrin! > 0) Linkage $6 > > In your code you assume that $6 is a URL, but that will NEVER be the case > according to MARC standard. We are going to lose flexibility, but I agree we should follow the standard. > 1) Missing POD for _get_marc_authors > > Could it be a little confusing having _get_marc_authors and get_marc_authors? Added POD. > 2) On get_marc_contributurs, you write: > > (700..712 for MARC21) > > but: > > + if ( $marcflavour eq "UNIMARC" ) { > + $mintag = "700"; > + $maxtag = "712"; > + $fields_filter = '7..'; > + } else { # marc21/normarc > + $mintag = "700"; > + $maxtag = "720"; > + $fields_filter = '7..'; > + } > > Overall using a range instead of a list seems a little risky, but works for > MARC21. It looks like a lot of fields, but actually it's only: 700, 710, 711 > and 720. > (https://www.loc.gov/marc/bibliographic/bd70x75x.html) Adjusted the POD! > 3) Missing 110, 111 > > If we get 710 and 711 we should probably include 110 and 111 in > get_marc_authors as well. As it was 'wrong' before, should we file a > separate bug report to extend this method? Hum, yes? I don't know! Any ideas why it's missing here? > 4) Pref description > > I am struggling a bit with the description. > > [Display|Don't display] author identifiers for research publications. > > It makes it sound, like it was limited to research publications, while the > limit is actually the 024 existing or not. > > Adding information that this requires authorities and 024 would be good I > think. Maybe: > > > [Display|Don't display] identifiers for authors and contributors to the > detail pages in the OPAC. This feature requires authorities with 024 Done, thanks for the suggestion. > 5) Selection of $2 > > + [% CASE 'orcid' %]ORCID: > + [% CASE 'scopus' %]ScopusID: > + [% CASE 'loop' %]loop: > + [% CASE 'rid' %]Publons: > > a) Should these be surrounded by <span>? > b) $2 are usually taken from the official LOC list: > https://www.loc.gov/standards/sourcelist/standard-identifier.html > > orcid = ORCID OK > scopus = ScopusID OK > loop = doesn't exist in official list. I am fine with it if that is a custom > one, but maybe worth checking? > rid = ResearcherID, linking to: > http://www.researcherid.com/#rid-for-researchers, stating: > ResearcherID profiles moved to Publons on 15 April 2019 - so probably OK Hugo, do you know "loop"? > viaf might be a good candidate (for another bug). I have added here. > The fallback worries me: > [% CASE %][% identifier.source | html %]: > > I think we should stick with a hardcoded list as not all $2 codes and > identifiers are useful to patrons (and they might get into the catalog, if > you use a central authority file) Done, but I am not sure I agree with this :) Won't we get request from lot of people to add theirs? > c) I'd also suggest to add a class with the $2 to the <li> element, this way > each entry could be hidden and customized easily. Can you be more specific please? There is a class on the div already (author_identifier). With the new patches, do you think we should have: <span class="orcid">ORCID</span> ?