[Bug 19220] New: Allow XSLT procsessing for Z39.50 authority targets like for bibliographic targets
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Bug ID: 19220 Summary: Allow XSLT procsessing for Z39.50 authority targets like for bibliographic targets Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Z39.50 / SRU / OpenSearch Servers Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When configuring a bibliographic Z39.50 targets it's possible to list XSL scripts that change the record on import. While the option is also offered when adding authority Z39.50 targets, it doesn't work/hasn't been implemented. It would be great if this feature was available for both types of targets. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Allow XSLT procsessing for |Allow XSLT processing for |Z39.50 authority targets |Z39.50 authority targets |like for bibliographic |like for bibliographic |targets |targets -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** Bug 20431 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |22532 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22532 [Bug 22532] Remove "random" from Z39.50 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Bug 19220 depends on bug 22532, which changed state. Bug 22532 Summary: Remove "random" from Z39.50 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22532 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #2 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 114604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114604&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save 4) Remove the content of the import_records table to avoid cache issues 5) Search for an authority with the "New from Z39.50/SRU" button in authorities home 6) Check that the XSLT transformation has been applied, both in results list and in the import window Here is an example XSLT which removes the 801 field from authorities: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> <xsl:template match="marc:datafield[@tag='801']"> </xsl:template> </xsl:stylesheet> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matthias.meusburger@biblibr | |e.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matthias.meusburger@biblibr |ity.org |e.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #3 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- I didn't add any new unit tests, since t/db_dependent/Breeding.t still passes with this patch, and _do_xslt_proc is already tested in it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Matts, I am sorry, but I couldn't get this to work. :( 1) Applied patch 2) Restart all 3) Added a file to intranet-tmpl/prog/en/xslt/Del040.xsl using your template. Only change I made was 801 to 040. 4) Updated configuration for Z39.50 LOC for Names adding "Del040.xsl" to the last config option. 5) Did a search for "Müller". Checked MARC preview - 040 is shown. 6) Imported the record: 040 is there :( Can you spot the mistake or verify it still works for you? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #5 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Hi, I've tested this again on master today, and it still works as expected as far as I'm concerned. Two things that comes to mind: - You don't mention emptying the import_records table. Did you do it? Otherwise, if you select a previously searched record, the cached version will be used and the XSLT transformation will not happen. - Did you use the complete pathname when editing the Z39 server ? (ie: /home/koha/src/koha-tmpl/intranet-tmpl/prog/en/xslt/Del040.xsl and not koha-tmpl/intranet-tmpl/prog/en/xslt/Del040.xsl or Del040.xsl) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Matthias Meusburger from comment #5)
Hi,
I've tested this again on master today, and it still works as expected as far as I'm concerned.
Two things that comes to mind:
- You don't mention emptying the import_records table. Did you do it? Otherwise, if you select a previously searched record, the cached version will be used and the XSLT transformation will not happen.
I did a quite random search, I don't think that it was in the import table or at least it would be quite unlikely.
- Did you use the complete pathname when editing the Z39 server ? (ie: /home/koha/src/koha-tmpl/intranet-tmpl/prog/en/xslt/Del040.xsl and not koha-tmpl/intranet-tmpl/prog/en/xslt/Del040.xsl or Del040.xsl)
I used the file name, as I hat put my sample one in the same directory as the existing ones listed in the documentation for bibliopgraphic Z39.50. Is this not expected to work? Changing status so another person could give this a shot. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #7 from Matthias Meusburger <matthias.meusburger@biblibre.com> ---
I did a quite random search, I don't think that it was in the import table or at least it would be quite unlikely.
Well, old entries in import_records are only deleted by misc/cronjobs/cleanup_database.pl as far as I know. So if you don't run this script at all, you can have very old entries. Oh, and is "Müller" such a random search, since it's the most common family surname in Germany? :)
I used the file name, as I hat put my sample one in the same directory as the existing ones listed in the documentation for bibliopgraphic Z39.50. Is this not expected to work?
You're absolutely right, as stated in https://koha-community.org/manual/20.11/en/html/administration.html#add-a-z3... , a simple filename will be searched in /koha-tmpl/intranet-tmpl/prog/en/xslt/ , among other directories by the _get_best_default_xslt_filename function. I just tested this myself, and it worked. So perhaps it was the import_records table that should have been emptied? Another sidenote: You won't see the transformation in the preview window. This is debatable, but this is the way it already works for bibliographic records, and one can argue that the preview is meant to see how the record looks like in its source catalogue. Anyway, thanks for testing :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Sorry, Matts, I can't get this to work. - I've made sure to search for all different terms - The field I want to delete is still there after I imported the record We really need someone else to give this a try. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Filippos Kolovos <f.kolovos@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |f.kolovos@gmail.com --- Comment #9 from Filippos Kolovos <f.kolovos@gmail.com> --- Dear Katrin, Matthias is right. I just tested it and it does work. What I have noticed, is that for bibliographic records, the import script re-transforms the output XML EVERY time (even if the record is cached from a previous search). For authority records, it prefers to fetch the cached version, as is, from the with the last transformation made (or not made if you didn't specify a custom XSLT). So, you have to run the cleanup_database.pl tool like this (assuming that you have a package installation): koha-foreach --chdir --enabled /usr/share/koha/bin/cronjobs/cleanup_database.pl --confirm --z3950 in order to clear the cached entries from z3950 searches. Otherwise you will always see the last result. I tested it and if I did not run the cleanup tool, the XSL didn't do anything. After I ran it, everytime I had the "XSL-updated" results. Even if you remove the custom XSL from the Z3950 AUTH SERVER setting, then you have to rerun the script for it to work, otherwise it will still display the "XSL-updated" results from your previous queries. I hope that this helps you, -Fk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Matts, reading the comment above I feel like the caching will be an issue here - it will cause the transformation to to not work reliably as I have struggled to much with it. And I feel like this will be very confusing to libraries too that want to use the feature. But could we make it work "always", even if you happen to have "seen" the record before? I get that this would also be consistent with how it works for bibliographic records. Just to make sure: My last test was done on a fresh sample database with lots of different names, so I believe there might be another cause too, even if everyone tells me otherwise :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #11 from Filippos Kolovos <f.kolovos@gmail.com> --- Katrin, Just one more thought on that, since you mention that the failure was consistent in your case. Did you always checked the search to be done *only* on the Z3950 server on which you have configured the XSLT? Because everytime the search window is reopened all default search servers are pre-selected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I have 2 authority targets configured, but made sure to only select results from the configured one with the XSLT transformation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #13 from Filippos Kolovos <f.kolovos@gmail.com> --- Created attachment 121897 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121897&action=edit Bug 19220 - Allow XSLT processing for Z39.50 authority Matthias and Katrin, I worked on it a bit and I seem to have found where the issue might be. It is in the Breeding.pm module, where for the Authorities if an import_record_id already exists in the import_records table for that authority in the import_auths table, then it simply returns the import_record_id, ignoring the new MARC data that have been returned from the new XSL transformation. If the auth record does not exist in the import_auths table, then the AddAuthToBatch() is called, which adds the auth into import_records, with the marc and marcxml correctly. In the case of biblios, it always runs the AddBiblioToBatch(), even if the biblio is already in the cache, returning the new id, hence the new marc. Please try the patch I have uploaded, where I update the import_records table for the specific import_record_id, with the new marc values (plain marc and marcxml), since they ae both used later on in the Marc Preview and import functionalities. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Filippos Kolovos <f.kolovos@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121897|0 |1 is obsolete| | --- Comment #14 from Filippos Kolovos <f.kolovos@gmail.com> --- Created attachment 121906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121906&action=edit Bug 19220- Allow XSLT processing for Z39.50 authority targets like for bibliographic targets A minor correction in the previous patch in Breedin.pm, where it retrieves the marcflavour from preferences. The "shift" operation is not required -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #15 from Filippos Kolovos <f.kolovos@gmail.com> --- Created attachment 121907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121907&action=edit Bug 19220 Allow XSLT processing for Z39.50 authority version 1 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=29333 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Any news ? Are the 2 new patches an alternate ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #17 from Filippos Kolovos <f.kolovos@gmail.com> --- Dear Fridolin Goodmorning, As far as I am concerned, I have tested it in branches 20.x and 21.x and it works as expected. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Needs a rebase on current master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #19 from Fridolin Somers <fridolin.somers@biblibre.com> --- I suppose _do_xslt_proc() can be called just after SetUTF8Flag() -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #20 from Fridolin Somers <fridolin.somers@biblibre.com> --- Arf for UNIMARC there is a strange behavior, we had to patch to always set MARCFlavor : https://git.biblibre.com/biblibre/kohac/commit/cdb6e4cd1d56ae2904f7f722f21ba... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114604|0 |1 is obsolete| | --- Comment #21 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 172627 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172627&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #121906|0 |1 is obsolete| | Attachment #121907|0 |1 is obsolete| | Attachment #172627|0 |1 is obsolete| | --- Comment #22 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 172628 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=172628&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #23 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Hi! I've reworked this patch: - Merged all the patches in one (Thanks Filippos Kolovos for your contribution) - Updated the test plan - Wrote unit tests specifically to check that we don't run into the caching issues you've mentioned earlier, Katrin. It's ready to be tested again :) To the QA team: the qa script tells me I've added 2 messy lines, even though I've ran Tidy on the code I added. I don't know why, sorry about that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #172628|0 |1 is obsolete| | --- Comment #24 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 173438 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=173438&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |martin.renvoize@ptfs-europe | |.com --- Comment #25 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Works in testing for me.. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #173438|0 |1 is obsolete| | --- Comment #26 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 179440 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179440&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #27 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This looks good, just a few comments; 1 - The change in ImportBreedingAuth to prevent caching issues should have a comment to explain what this code is doing, we could improve this in the future, maybe clearing the cache wehn XLST for a source is changed, but that's another bug 2 - The Direct SQL should be avoided in ImportBreedingAuth and the test should use Koha::Import::Record objects -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39487 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phil@chetcolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #28 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- Created attachment 180197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180197&action=edit Bug 19220, QA Follow-up: Allow XSLT processing for Z39.50 authority targets - Add comment about clearing cache - Use Koha::Import::Record instead of SQL queries in both tests and code -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Matthias Meusburger <matthias.meusburger@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #179440|0 |1 is obsolete| | --- Comment #29 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 180232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180232&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #30 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 180233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=180233&action=edit Bug 19220: (QA follow-up) Allow XSLT processing for Z39.50 authority targets - Add comment about clearing cache - Use Koha::Import::Record instead of SQL queries in both tests and code Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Patch doesn't apply Keywords| |rel_25_05_candidate --- Comment #31 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Please rebase! Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 19220, QA Follow-up: Allow XSLT processing for Z39.50 authority targets error: sha1 information is lacking or useless (C4/Breeding.pm). error: could not build fake ancestor Patch failed at 0001 Bug 19220, QA Follow-up: Allow XSLT processing for Z39.50 authority targets hint: Use 'git am --show-current-patch=diff' to see the failed patch 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-19220-QA-Follow-up-Allow-XSLT-processing-for-Z-lu_1rtuf.patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #32 from Fridolin Somers <fridolin.somers@biblibre.com> --- Looks like 1st patch is same as 3rd no ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_25_05_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hammat.wele@inlibro.com Attachment #180197|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Hammat wele <hammat.wele@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #33 from Hammat wele <hammat.wele@inlibro.com> --- Created attachment 183245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183245&action=edit Bug 19220: (follow-up) Fix error 500 when Searching for an authority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com --- Comment #34 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- We don't want to step on any toes, but we needed this for a client so Hammat rebased the patch. Hope it's ok. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 --- Comment #35 from Matthias Meusburger <matthias.meusburger@biblibre.com> --- (In reply to Caroline Cyr La Rose from comment #34)
We don't want to step on any toes, but we needed this for a client so Hammat rebased the patch. Hope it's ok.
On the contrary, thank you for rebasing the patch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180232|0 |1 is obsolete| | --- Comment #36 from David Nind <david@davidnind.com> --- Created attachment 183270 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183270&action=edit Bug 19220: Allow XSLT processing for Z39.50 authority targets Test plan: 1) Apply the patch 2) Edit an authority Z3950/SRU source in Home > Administration > Z39.50/SRU servers 3) Add the path to an XSLT file in the "XSLT File(s) for transforming results" input, and save For instance: <path_to_src>/koha-tmpl/intranet-tmpl/prog/en/xslt/Bug19220.xsl 4) Search for an authority with the "New from Z39.50/SRU" button in authorities home 5) Check that the XSLT transformation has been applied, both in results list and in the import window 6) Edit the Z3950/SRU source to remove the path to the XSLT file 7) Search again for the same authority, and check that no transformation has been applied 8) prove t/db_dependent/Breeding_Auth.t Here is an example XSLT which adds a 035$a field: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:marc="http://www.loc.gov/MARC21/slim" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="record|marc:record"> <record> <xsl:apply-templates/> <datafield tag="035" ind1='' ind2=''> <subfield code="a"> <xsl:text>XSLT added field</xsl:text> </subfield> </datafield> </record> </xsl:template> <xsl:template match="node()"> <xsl:copy select="."> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> </xsl:stylesheet> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #180233|0 |1 is obsolete| | --- Comment #37 from David Nind <david@davidnind.com> --- Created attachment 183271 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183271&action=edit Bug 19220: (QA follow-up) Allow XSLT processing for Z39.50 authority targets - Add comment about clearing cache - Use Koha::Import::Record instead of SQL queries in both tests and code Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183245|0 |1 is obsolete| | --- Comment #38 from David Nind <david@davidnind.com> --- Created attachment 183272 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183272&action=edit Bug 19220: (follow-up) Fix error 500 when Searching for an authority Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19220 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Signed Off |Failed QA --- Comment #39 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- A small follow-up is needed here: [FAIL] t/db_dependent/Breeding_Auth.t FAIL test_no_warnings 'use Test::NoWarnings' must be present in this test file -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org