IdRef system preference enables a Unimarc-only functionality. Authors fields contain in $3 subfield a PPN, an unique identifier in IdRef a French national authority file, similar to VIAF. KohaLa, the Koha French users association, has designed a revamped implementation of IdRef in Koha. The goal is to improve the visual and to add a functionality. - Visually — The author publications list is currently displayed in an old fashion dialog box. It uses greybox library, which is deprecated. See bug 8290. The list is displayed in a distinct tab of holdings block. - Functionality — The title in the list are searched in Koha local catalog. So it's possible to mark titles locally available and link to them. PPN are searched directly in Elasticsearch for efficiency. Koha IdRef users are academic libraries or higher education school. So Zebra support is not required for them.
Created attachment 144199 [details] [review] Bug 32333: IdRef system preference revamping IdRef system preference enables a Unimarc-only functionality. Authors fields contain in $3 subfield a PPN, an unique identifier in IdRef a French national authority file, similar to VIAF. KohaLa, the Koha French users association, has designed a revamped implementation of IdRef in Koha. The goal is to improve the visual and to add a functionality. - Visually — The author publications list is currently displayed in an old fashion dialog box. It uses greybox library, which is deprecated. See bug 8290. With this patch, the list is displayed in a distinct tab of holdings block. - Functionality — The title in the list are searched in Koha local catalog. So it's possible to mark titles locally available and link to them. PPN are searched directly in Elasticsearch for efficiency. Koha IdRef users are academic libraries or higher education school. So Zebra support is not required for them. NOTE: After pushing this patch, greybox library could be removed completely for OPAC : /koha-tmpl/opac-tmpl/bootstrap/lib/greybox/ TO TEST : - On a Unimarc Koha, with a Sudoc compliant Catalog, enable IdRef. - Use default OPAC XSL. - On opac-detail.pl page, you can see a logo IdRef next to authors having a $3 (ppn) subfield. Click on the logo. - Confirm that a tab is added to holdings. It contains the author publications found in the Sudoc. - A Sudoc logo is displayed in front of each title. Clicking the icon open the title in Sudoc web site. - A Koha logo is displayed in from of each title available locally. Clicking the logo open the title in Koha OPAC.
Changed assignee.
Created attachment 145663 [details] [review] Bug 32333: IdRef system preference revamping IdRef system preference enables a Unimarc-only functionality. Authors fields contain in $3 subfield a PPN, an unique identifier in IdRef a French national authority file, similar to VIAF. KohaLa, the Koha French users association, has designed a revamped implementation of IdRef in Koha. The goal is to improve the visual and to add a functionality. - Visually - The author publications list is currently displayed in an old fashion dialog box. It uses greybox library, which is deprecated. See bug 8290. With this patch, the list is displayed in a distinct tab of holdings block. - Functionality - The title in the list are searched in Koha local catalog. So it's possible to mark titles locally available and link to them. PPN are searched directly in Elasticsearch for efficiency. Koha IdRef users are academic libraries or higher education school. So Zebra support is not required for them. NOTE: After pushing this patch, greybox library could be removed completely for OPAC : /koha-tmpl/opac-tmpl/bootstrap/lib/greybox/ TO TEST : - On a Unimarc Koha, with a Sudoc compliant Catalog, enable IdRef. - Use default OPAC XSL. - On opac-detail.pl page, you can see a logo IdRef next to authors having a $3 (ppn) subfield. Click on the logo. - Confirm that a tab is added to holdings. It contains the author publications found in the Sudoc. - A Sudoc logo is displayed in front of each title. Clicking the icon open the title in Sudoc web site. - A Koha logo is displayed in from of each title available locally. Clicking the logo open the title in Koha OPAC. Signed-off-by: Matthias Meusburger <matthias.meusburger@biblibre.com>
The patch works as expected, however, some additional information could be added to the test plan: - it only works with Elastic Search. - an extra "ppn" index must be created.
Why does this depend on 8290 ?
FAIL koha-tmpl/opac-tmpl/bootstrap/js/idref.js FAIL ES template literals ES template literals found ( const url = `/cgi-bin/koha/svc/idref?ppn=${ppn}`;) - See bug 24725 ES template literals found ( const navig = publications.roles.map(role => `<a href="#idref-role-${role.code}" style="font-size: 90%;">${role.label} (${role.docs.length})</a>`);) - See bug 24725 ES template literals found ( html += `</td><td>${doc.citation}</td></tr>`;) - See bug 24725 ES template literals found ( html = `<div id="idref-publications">${html}</div>`;) - See bug 24725
(In reply to Marcel de Rooy from comment #5) > Why does this depend on 8290 ? Because if this patch is applied, Greybox dependence can be removed completely from Koha code base?
> FAIL ES template literals Sorry for this. Why is Javascript template literal usage prohibited?
(In reply to Frédéric Demians from comment #8) > > FAIL ES template literals > > Sorry for this. Why is Javascript template literal usage prohibited? The clue is in the message :) Bug 24725 - xgettext does not support (yet) ES template literals
(In reply to Frédéric Demians from comment #7) > (In reply to Marcel de Rooy from comment #5) > > Why does this depend on 8290 ? > > Because if this patch is applied, Greybox dependence can be removed > completely from Koha code base? I moved it to Blocks - this patch blocks the removal.
Created attachment 147762 [details] [review] Bug 32333: IdRef system preference revamping IdRef system preference enables a Unimarc-only functionality. Authors fields contain in $3 subfield a PPN, an unique identifier in IdRef a French national authority file, similar to VIAF. KohaLa, the Koha French users association, has designed a revamped implementation of IdRef in Koha. The goal is to improve the visual and to add a functionality. - Visually — The author publications list is currently displayed in an old fashion dialog box. It uses greybox library, which is deprecated. See bug 8290. With this patch, the list is displayed in a distinct tab of holdings block. - Functionality — The title in the list are searched in Koha local catalog. So it's possible to mark titles locally available and link to them. PPN are searched directly in Elasticsearch for efficiency. Koha IdRef users are academic libraries or higher education school. So Zebra support is not required for them. NOTE: After pushing this patch, greybox library could be removed completely for OPAC : /koha-tmpl/opac-tmpl/bootstrap/lib/greybox/ TO TEST : - On a Unimarc Koha, with a Sudoc compliant Catalog, enable IdRef. - Use default OPAC XSL. - On opac-detail.pl page, you can see a logo IdRef next to authors having a $3 (ppn) subfield. Click on the logo. - Confirm that a tab is added to holdings. It contains the author publications found in the Sudoc. - A Sudoc logo is displayed in front of each title. Clicking the icon open the title in Sudoc web site. - A Koha logo is displayed in from of each title available locally. Clicking the logo open the title in Koha OPAC.
Exactly the same patch without using JS template literals ``. Nothing else to test.
Created attachment 150675 [details] [review] Bug 32333: IdRef system preference revamping IdRef system preference enables a Unimarc-only functionality. Authors fields contain in $3 subfield a PPN, an unique identifier in IdRef a French national authority file, similar to VIAF. KohaLa, the Koha French users association, has designed a revamped implementation of IdRef in Koha. The goal is to improve the visual and to add a functionality. - Visually — The author publications list is currently displayed in an old fashion dialog box. It uses greybox library, which is deprecated. See bug 8290. With this patch, the list is displayed in a distinct tab of holdings block. - Functionality — The title in the list are searched in Koha local catalog. So it's possible to mark titles locally available and link to them. PPN are searched directly in Elasticsearch for efficiency. Koha IdRef users are academic libraries or higher education school. So Zebra support is not required for them. NOTE: After pushing this patch, greybox library could be removed completely for OPAC : /koha-tmpl/opac-tmpl/bootstrap/lib/greybox/ TO TEST : - On a Unimarc Koha, with a Sudoc compliant Catalog, enable IdRef. - Use default OPAC XSL. - On opac-detail.pl page, you can see a logo IdRef next to authors having a $3 (ppn) subfield. Click on the logo. - Confirm that a tab is added to holdings. It contains the author publications found in the Sudoc. - A Sudoc logo is displayed in front of each title. Clicking the icon open the title in Sudoc web site. - A Koha logo is displayed in from of each title available locally. Clicking the logo open the title in Koha OPAC.
I can't finish testing this right now because I don't have Elasticsearch working, but I have a question: Why not display the IdRef tab right away? Why wait for the user to click the link by the author?
> Why not display the IdRef tab right away? > Why wait for the user to click the link by the author? From my perspective, two main reasons : (1) Need — A user viewing a biblio record, generally don't need/want to see all other publications from document's author. And how to deal with multiples authors... (2) Fair use — This plugin queries IdRef webservice. It's "polite" not to abuse this service usage.
Tested on koha-testing-docker, works almost as expected 1) Should be added in the test plan : require to define a ppn index for the ppn of the record (to be able to do the back search of other existing records in Koha) (in BibLibre standard configuration it is for 009 field) Maybe the index should be added by the patch, to add it if not already present in ES configuration ? 2) In the Idref results list, the link to Idref or to Koha contain target, so for Idref produce Not found : https://www.sudoc.fr/260997757%20target http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=21650%20target= 3) Maybe an alert : Idref results sometimes take a long time to display (depending on the searched author, on the moment when the search is done, ...)
Also available as part of a plugin: https://github.com/fredericd/Koha-Plugin-KohaLa-AbesWS#publications-idref-%C3%A0-lopac It may be preferable to exfiltrate idref code from Koha core.