Bug 30554 - Use XSLT in authority search cataloguing plugin
Summary: Use XSLT in authority search cataloguing plugin
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Martin Renvoize
URL:
Keywords:
: 32512 (view as bug list)
Depends on: 11083
Blocks:
  Show dependency treegraph
 
Reported: 2022-04-15 15:31 UTC by Jérémy Breuillard
Modified: 2024-03-22 14:48 UTC (History)
6 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the authority search cataloguing plugin so that the search results when adding an authority term to a record are customisable when using the AuthorityXSLTResultsDisplay system preference (for both MARC21 and UNIMARC).
Version(s) released in:
24.05.00


Attachments
Bug 30554: Wrong display of authorities records in the Authority search plugin (3.26 KB, patch)
2022-04-15 15:34 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Very simple XSLT for testing purposes (works with MARC21 and UNIMARC) (611 bytes, application/xslt+xml)
2023-10-11 14:19 UTC, Julian Maurice
Details
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin (3.71 KB, patch)
2023-10-11 14:23 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin (3.86 KB, patch)
2023-10-11 14:25 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin (3.91 KB, patch)
2023-10-17 23:15 UTC, David Nind
Details | Diff | Splinter Review
Screenshots - before and after patch applied (7.62 KB, application/pdf)
2023-10-17 23:36 UTC, David Nind
Details
Screenshots - before and after patch applied (183.32 KB, application/pdf)
2023-10-17 23:39 UTC, David Nind
Details
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin (4.00 KB, patch)
2024-01-26 12:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30554: Embelished MARC21 XSLT example (7.36 KB, patch)
2024-01-26 12:45 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 30554: Embelished MARC21 XSLT example (13.31 KB, patch)
2024-01-26 15:19 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jérémy Breuillard 2022-04-15 15:31:55 UTC
Once the search is done with this plugin some of the authorities are wrong displayed because parts and links are missing. It is not the case if the search is made via authority mobile
Comment 1 Jérémy Breuillard 2022-04-15 15:34:03 UTC
Created attachment 133359 [details] [review]
Bug 30554: Wrong display of authorities records in the Authority search plugin

With this patch the display of the authorities records is available at XSLT format

Test plan:
1)Make sure to have at least one Authority Type defined
2)Home > Cataloging > New record > tab.7 Field 700$a
3)Click on the Tag editor button
4)Click on Search button and notice the displaying of the results
5)Apply patch and repeat 3) and 4)
6)The results are now displayed at XSLT format
Comment 2 Owen Leonard 2022-05-11 12:02:31 UTC
Doesn't apply:

Applying: MT 36361: Wrong display of authorities records in the Authority search plugin
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt).
error: could not build fake ancestor
Patch failed at 0001 MT 36361: Wrong display of authorities records in the Authority search plugin
Comment 3 Julian Maurice 2023-10-11 14:19:58 UTC
Created attachment 156824 [details]
Very simple XSLT for testing purposes (works with MARC21 and UNIMARC)
Comment 4 Julian Maurice 2023-10-11 14:23:28 UTC
Created attachment 156825 [details] [review]
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin

Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
   attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
   a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
   XSLT output (if using the example file it should be a link saying
   "Authority #<authid>")
Comment 5 Julian Maurice 2023-10-11 14:25:14 UTC
Created attachment 156826 [details] [review]
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin

Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
   attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
   a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
   XSLT output (if using the example file it should be a link saying
   "Authority #<authid>")

Sponsored-by: Écoles nationales supérieure d'architecture (ENSA)
Comment 6 David Nind 2023-10-17 23:15:41 UTC
Created attachment 157293 [details] [review]
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin

Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
   attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
   a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
   XSLT output (if using the example file it should be a link saying
   "Authority #<authid>")

Sponsored-by: Écoles nationales supérieure d'architecture (ENSA)
Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2023-10-17 23:36:44 UTC
Created attachment 157294 [details]
Screenshots - before and after patch applied

Testing notes (using KTD):

1. Edit any record (for example, CGI programming with Perl).

2. Add another topical term in 650$a (repeat the tag, click on the tag editor, click search).

3. Default search results format is displayed (see attachment).

4. Apply the patch and restart_all.

5. Save the simple record attached to the bug to somewhere like /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/xslt/AuthorityXSLTResultsDisplay.xsl

6. Update the AuthorityXSLTResultsDisplay system preference with this path.

7. Repeat steps 1-2.

8. Note that the search results are displayed using the custom XSLT file (see attachment).

Note: Only tested on a MARC21 instance.
Comment 8 David Nind 2023-10-17 23:39:07 UTC Comment hidden (obsolete)
Comment 9 David Nind 2023-10-17 23:39:54 UTC
Created attachment 157295 [details]
Screenshots - before and after patch applied

Screenshot of search results - before and after the patch is applied.
Comment 10 Martin Renvoize 2024-01-26 12:45:32 UTC
Created attachment 161517 [details] [review]
Bug 30554: Use XSLT (if enabled) in authority search cataloguing plugin

Test plan:
1. Set AuthorityXSLTResultsDisplay to a valid XSL file (see bug 30554
   attachments, there is an example XSL file)
2. Go to the bibliographic record editor (edit an existing one or create
   a new one)
3. Find a field linked to authorities and open the plugin
4. Start a search and verify that the results are displayed using the
   XSLT output (if using the example file it should be a link saying
   "Authority #<authid>")

Sponsored-by: Écoles nationales supérieure d'architecture (ENSA)
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2024-01-26 12:45:35 UTC Comment hidden (obsolete)
Comment 12 Martin Renvoize 2024-01-26 12:54:26 UTC
There are no regressions caused by this, though I'd love to have a much more comprehensive example XSLT that at least mimicked the existing non-xslt display.

I've started that task, but my MARC21 isn't entirely up to the task and I'd appreciate some help getting that done.

However.. I do think we can Pass QA as is to get the foundations of the feature in.. at a future point I'd like to remove the non-xslt view and just replace it with this as we have done for biblio displays.
Comment 13 Martin Renvoize 2024-01-26 15:19:26 UTC Comment hidden (obsolete)
Comment 14 Martin Renvoize 2024-01-27 19:02:42 UTC
*** Bug 32512 has been marked as a duplicate of this bug. ***
Comment 15 Katrin Fischer 2024-03-22 14:48:09 UTC
Pushed for 24.05!

Well done everyone, thank you!