Bug 17385 - Add custom export formats for bibliographic records
Summary: Add custom export formats for bibliographic records
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature (vote)
Assignee: Matthias Le Gac
QA Contact: Marcel de Rooy
URL:
Keywords: no-sandbox
Depends on:
Blocks:
 
Reported: 2016-09-30 15:17 UTC by Bouzid Fergani
Modified: 2024-04-12 17:29 UTC (History)
18 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17385 - Add custom export notices (32.51 KB, patch)
2016-09-30 15:36 UTC, Bouzid Fergani
Details | Diff | Splinter Review
Bug 17385 - Add custom export notices (32.33 KB, patch)
2016-12-20 17:04 UTC, Bouzid Fergani
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17385 - Add custom export notices (32.53 KB, patch)
2017-06-06 10:50 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17385 - Fix pod (608 bytes, patch)
2017-06-06 10:50 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17385 - Add custom export XSLT (25.66 KB, patch)
2017-09-26 14:18 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 17385 - Add custom export XSLT (25.79 KB, patch)
2017-10-03 23:56 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (25.84 KB, patch)
2018-04-20 20:09 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (8.64 KB, patch)
2018-04-20 20:09 UTC, David Bourgault
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.12 KB, patch)
2018-09-18 15:46 UTC, Blou
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (8.66 KB, patch)
2018-09-18 15:47 UTC, Blou
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (8.98 KB, patch)
2018-10-16 18:07 UTC, Cori Lynn Arnold
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.28 KB, patch)
2018-10-28 09:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (8.98 KB, patch)
2018-10-28 09:48 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.15 KB, patch)
2019-01-24 19:33 UTC, Mikaël Olangcay Brisebois
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.15 KB, patch)
2019-01-24 19:35 UTC, Mikaël Olangcay Brisebois
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (8.95 KB, patch)
2019-01-24 19:35 UTC, Mikaël Olangcay Brisebois
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.86 KB, patch)
2019-03-22 09:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (9.08 KB, patch)
2019-03-22 09:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (1.92 KB, patch)
2019-03-22 09:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.84 KB, patch)
2019-03-22 09:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (2.09 KB, patch)
2019-03-22 09:52 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.97 KB, patch)
2019-03-22 09:53 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 17385: QA ctrics fixed (11.70 KB, patch)
2020-01-09 13:43 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.91 KB, patch)
2020-01-09 15:37 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (9.01 KB, patch)
2020-01-09 15:37 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (6.34 KB, patch)
2020-01-09 15:37 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.94 KB, patch)
2020-01-09 15:37 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: QA Critics Fixed and added Missing Filters (11.19 KB, patch)
2020-01-09 15:38 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (26.98 KB, patch)
2020-03-06 19:48 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (9.01 KB, patch)
2020-03-06 19:48 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (3.24 KB, patch)
2020-03-06 19:49 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.12 KB, patch)
2020-03-06 19:49 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: QA Critics Fixed and added Missing Filters (10.57 KB, patch)
2020-03-06 19:49 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Added download option in list (8.57 KB, patch)
2020-03-12 20:26 UTC, Gabriel DeCarufel
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (27.14 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (9.09 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (3.29 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.17 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: QA Critics Fixed and added Missing Filters (10.69 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: Added download option in list (8.65 KB, patch)
2020-03-13 09:02 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (27.01 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (10.31 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (3.29 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.18 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: QA Critics Fixed and added Missing Filters (10.62 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: Added download option in list (7.35 KB, patch)
2020-10-29 20:11 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (10.31 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (3.29 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.18 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: QA Critics Fixed and added Missing Filters (10.62 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: Added download option in list (7.35 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Changes to be committed: modified: koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc modified: t/XSLT.t (4.88 KB, patch)
2020-10-29 20:56 UTC, Ivan Dziuba
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.35 KB, patch)
2020-11-03 21:56 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.65 KB, patch)
2020-11-03 21:57 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.18 KB, patch)
2020-11-03 21:57 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (5.67 KB, patch)
2020-11-03 21:58 UTC, Alexis Ripetti
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.98 KB, patch)
2022-02-08 13:29 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-02-08 13:29 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.34 KB, patch)
2022-02-08 13:29 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.81 KB, patch)
2022-02-08 13:29 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.67 KB, patch)
2022-02-08 13:29 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (33.03 KB, patch)
2022-02-16 18:45 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-02-16 18:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (3.34 KB, patch)
2022-02-16 18:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.81 KB, patch)
2022-02-16 18:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.67 KB, patch)
2022-02-16 18:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-03-08 16:24 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.92 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.85 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.67 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-03-29 20:28 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-03-30 12:13 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (33.04 KB, patch)
2022-04-20 19:45 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-04-20 19:45 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.85 KB, patch)
2022-04-20 19:45 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-04-20 19:45 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.67 KB, patch)
2022-04-20 19:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-04-20 19:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-04-20 19:46 UTC, The Minh Luong
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (33.05 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.85 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.67 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-07-22 14:36 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-07-22 14:37 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.96 KB, patch)
2022-07-25 12:57 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-07-25 12:57 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.85 KB, patch)
2022-07-25 12:57 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-07-25 12:57 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.66 KB, patch)
2022-07-25 12:58 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-07-25 12:58 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-07-25 12:58 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add missing imports and equivalent code for GetMarcBiblio (2.57 KB, patch)
2022-07-26 14:14 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.88 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.35 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.85 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.66 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.38 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-08-17 12:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add missing imports and equivalent code for GetMarcBiblio (2.50 KB, patch)
2022-08-17 12:49 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.80 KB, patch)
2022-09-30 14:11 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.31 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.86 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custum export format option when saving a record (9.63 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Correction of opac-detail-sidebar.inc (4.37 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Fixing display for XSL-Simple Export in OPAC (2.05 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add missing imports and equivalent code for GetMarcBiblio (2.50 KB, patch)
2022-09-30 14:12 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.96 KB, patch)
2022-11-29 20:23 UTC, Hammat wele
Details | Diff | Splinter Review
This patch adds 'XSL-Simple Export' when saving a bibliographic record (31.09 KB, patch)
2022-11-29 20:57 UTC, Hammat wele
Details | Diff | Splinter Review
This patch adds 'XSL-Simple Export' when saving a bibliographic record (18.11 KB, patch)
2022-12-01 15:10 UTC, Hammat wele
Details | Diff | Splinter Review
This patch adds 'XSL-Simple Export' when saving a bibliographic record (33.15 KB, text/plain)
2022-12-01 21:19 UTC, Hammat wele
Details
Bug 17385: Add custom export XSLT (32.29 KB, patch)
2023-05-11 20:39 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.31 KB, patch)
2023-05-11 20:39 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.86 KB, patch)
2023-05-11 20:40 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.84 KB, patch)
2023-05-11 20:40 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (30.92 KB, patch)
2023-05-11 20:40 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (32.33 KB, patch)
2023-05-11 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (4.36 KB, patch)
2023-05-11 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (2.86 KB, patch)
2023-05-11 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.88 KB, patch)
2023-05-11 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (30.97 KB, patch)
2023-05-11 21:50 UTC, David Nind
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (30.22 KB, patch)
2023-05-17 19:36 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (2.80 KB, patch)
2023-05-17 19:37 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (1.88 KB, patch)
2023-05-17 19:37 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.95 KB, patch)
2023-05-17 19:37 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (28.50 KB, patch)
2023-05-17 19:37 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (30.23 KB, patch)
2023-08-11 15:58 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (2.80 KB, patch)
2023-08-11 15:59 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (1.88 KB, patch)
2023-08-11 16:00 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.93 KB, patch)
2023-08-11 16:01 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (28.65 KB, text/plain)
2023-08-11 16:01 UTC, Hammat wele
Details
Bug 17385: Add custom export XSLT (30.23 KB, patch)
2023-10-11 11:53 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (2.80 KB, patch)
2023-10-11 11:53 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (1.88 KB, patch)
2023-10-11 11:53 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.93 KB, patch)
2023-10-11 11:53 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (27.20 KB, patch)
2023-10-11 11:54 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 17385: Add custom export XSLT (30.19 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder (2.80 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add caching (1.88 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 17385: Add tests for CustomXSLTExportList (4.93 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 17385: Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList (27.20 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
Bug 17385: (QA follow-up) Add CustomXSLTExportPath & improve descriptions (144.41 KB, patch)
2023-11-20 19:32 UTC, Emily-Rose Francoeur
Details | Diff | Splinter Review
XSLT test files (1.81 KB, application/zip)
2023-11-20 19:35 UTC, Emily-Rose Francoeur
Details
Bug 17385: (QA follow-up) Add CustomXSLTExportPath & improve descriptions (132.68 KB, patch)
2024-03-21 14:33 UTC, Matthias Le Gac
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Bouzid Fergani 2016-09-30 15:17:50 UTC
this patch, add custom export notices using xslt.
Comment 1 Bouzid Fergani 2016-09-30 15:36:34 UTC Comment hidden (obsolete)
Comment 2 Michael Kuhn 2016-10-16 14:15:12 UTC
I applied the patch. The following is as you describe:

* Patch can be applied
* The folder /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport for intranet is there
* The folder /koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport for opac is there
* In the folder /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport-samples there is the sample file "MARC21_simple_export.xsl"
* This file can also be found in /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport for intranet and in /koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport for opac

As the next point you write: "Open intranet or opac interface and submit any search, open any notices found."

I opened both Intranet and OPAC and searched for the only book in my test catalog. But there were no "notices" found so I couldn't open any. What do you mean with "notices"?
Comment 3 Katrin Fischer 2016-10-16 14:23:15 UTC
notice = record (French?)
Comment 4 Bouzid Fergani 2016-10-17 13:00:35 UTC
Hi Michael,
sorry, i not write correctly
    - Apply patch
    - Open intranet or opac interface and submit any search, click title of one item found.
    - Click Save and you found Simple Export.
    - Click Simple Export and you have a file.html, it contain informations returned by the xslt file.
    - You can use it in basket and lists.
    - The name 'Simple Export' it's extract in the xslt file, curently the name is MARC21_simple_export.xsl.
    
Bouzid.
Comment 5 Michael Kuhn 2016-10-19 20:34:49 UTC
I applied the patch again. The following is as you describe:

* Patch can be applied
* The folder /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport for intranet is there
* The folder /koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport for opac is there
* In the folder /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport-samples there is the sample file "MARC21_simple_export.xsl"
* This file can also be found in /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport for intranet and in /koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport for opac
* I open the Intranet interface, submit a search, click the title of a found item

Then I click the button "Save", but I can only see formats BIBTEX, Dublin Core, MARCXML, three kinds of MARC, MODS and RIS - but no "Simple Export".

In the OPAC interface it is almost the same. There I click the button "Save record" but there are only the formats already given above, plus one more (ISBD). But no "Simple Export".
Comment 6 Bouzid Fergani 2016-10-25 14:58:13 UTC
Are you sure MARC21_simple_export.xsl exist in folders /koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport and /koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport, because for me, when i apply this patch in actual master, it work correctly.
Comment 7 Michael Kuhn 2016-10-25 21:54:24 UTC
I have set up a completely new kohadevbox.

vagrant@kohadevbox:~$ cd kohaclone
vagrant@kohadevbox:kohaclone(master)$ git pull
Already up-to-date.
vagrant@kohadevbox:kohaclone(master)$ git checkout -b 001
Switched to a new branch '001'

Then I tried to apply patch 17385 again, but I was not able to do it:

vagrant@kohadevbox:kohaclone(001)$ git bz apply 17385
Bug 17385 - Add custom export notices

55961 - Bug 17385 - Add custom export notices

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17385 - Add custom export notices
fatal: sha1 information is lacking or useless (opac/opac-detail.pl).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 17385 - Add custom export notices
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/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-17385---Add-custom-export-notices-0lLL49.patch
Comment 8 Bouzid Fergani 2016-12-20 17:04:29 UTC Comment hidden (obsolete)
Comment 9 Bouzid Fergani 2016-12-20 17:05:09 UTC
Rebase patch
Comment 10 Josef Moravec 2017-06-06 10:50:07 UTC Comment hidden (obsolete)
Comment 11 Josef Moravec 2017-06-06 10:50:10 UTC Comment hidden (obsolete)
Comment 12 Marcel de Rooy 2017-09-01 08:28:06 UTC
QA: Looking here now
Comment 13 Marcel de Rooy 2017-09-01 08:50:18 UTC
QA Comment:
Thanks for your work. I think this is not yet ready for inclusion.

 sub XSLTParse4Display {
-    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang ) = @_;
+    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items, $sysxml, $xslfilename, $lang, $xslFile, $opac ) = @_;
We already have $xslfilename. You add $xslFile ? Does not look good. 
The added code seems repetitive.

You add a new routine CustomXSLTExportList. It needs unit tests.
In that routine you are parsing the xsl files for something like +<!-- xml title="Simple Export" -->. I am not sure if that is a good idea. Another QA pov is welcome too.
Note that you are doing it each time again too.
If you provide clear xslt names, that should probably be sufficient. Please think about another way to enrich that information if needed.

--- a/Koha/XSLT_Handler.pm
+++ b/Koha/XSLT_Handler.pm
@@ -168,7 +168,6 @@ sub transform {
         ( $xml, $filename, $format ) = @_;
         $format ||= 'chars';
     }
-
     #Initialized yet?
     if ( !$self->{xslt_hash} ) {
         $self->_init;
No need to remove an empty line if you are not touching this module anyway.

diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport/README b/koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport/README
new file mode 100644
Empty README ?
And another further on.

koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport-samples/MARC21_simple_export.xsl koha-tmpl/opac-tmpl/bootstrap/en/xslt/biblioexport/MARC21_simple_export.xsl
What is the use of adding two identical files here ?
Actually, all files here are sort of sample files.
Comment 14 David Bourgault 2017-09-26 14:18:02 UTC Comment hidden (obsolete)
Comment 15 Alex Buckley 2017-10-03 23:56:43 UTC Comment hidden (obsolete)
Comment 16 Marcel de Rooy 2018-01-12 07:19:04 UTC
Thx for your adjustments! Looks good to me. Final comments:

This is not a blocker for me, but OpacExportOptions controls the options listed by detail sidebar. Your custom exports are listed no matter what. It might be better to let OpacExportOptions also control if the custom exports should be added to the list somehow. Maybe not one by one, but just on directory level (show them all or not)?
But do not make big adjustments here. It could be handled on a new report or we could simply state: remove the xsl files from biblioexport.

XSLTParse4Display is not yet tested, but your change should officially be tested ;)
    Also I recommend to remove the opac parameter. It is not consistent with the approach followed in the sub. Not changing the parameters could help you here.
    Please send XSLTCustomExport and OPACXSLTCustomExport to the routine; this is consistent and does the same thing.
    Since your change only deals with the $xslfilename, I could live without a test script (but I am not sure about the RM).

CustomXSLTExportList is new and should really have its own test (should not be hard)
    Mock opachtdocs and create the dir in a tempdir. Check on returned title and method.
Comment 17 David Bourgault 2018-04-20 20:09:28 UTC Comment hidden (obsolete)
Comment 18 David Bourgault 2018-04-20 20:09:40 UTC Comment hidden (obsolete)
Comment 19 Martin Renvoize 2018-06-13 09:54:25 UTC
Comment on attachment 74660 [details] [review]
Bug 17385: Add custom export XSLT

Review of attachment 74660 [details] [review]:
-----------------------------------------------------------------

Generally looks good with a few minor code comments added for review.

::: C4/XSLT.pm
@@ +197,5 @@
>      $xslfilename ||= C4::Context->preference($xslsyspref);
>      $lang ||= C4::Languages::getlanguage();
>  
> +    if ($xslsyspref eq "XSLTCustomExport") {
> +        my $dir;

The code used to defined $dir in CustomXSLTExportList which does the same thing is cleaner.. why not use that here too... or even factor it out and use the same factored out routine for both to keep it DRY?

@@ +370,5 @@
>  }
>  
> +=head2 CustomXSLTExportList
> +
> + Returns list of file for custom xslt conversion

Please add accepted parameters (i.e. $opac) to the POD section and note their required status and what they accept (string, int, etc)
Comment 20 Martin Renvoize 2018-06-13 10:03:37 UTC
Ignore the first comment in that review.. you've already changed it in the followup.
Comment 21 Katrin Fischer 2018-08-23 06:31:44 UTC
I am sorry, patch doesn't apply with a lot of conflicts. Can you please rebase?
Comment 22 Blou 2018-09-18 15:46:25 UTC Comment hidden (obsolete)
Comment 23 Blou 2018-09-18 15:47:59 UTC Comment hidden (obsolete)
Comment 24 Cori Lynn Arnold 2018-10-16 18:07:01 UTC Comment hidden (obsolete)
Comment 25 Katrin Fischer 2018-10-28 09:46:45 UTC
I've attached rebased patches and added Cori Lynn's sign-off to the first patch as well. 

1) Can you please add POD to CustomXSLTExportList (see comment #19)

2) There is lots of minor (fast to fix) fails in the QA script:

FAIL	koha-tmpl/intranet-tmpl/prog/en/includes/cat-toolbar.inc
   FAIL	  filters
		wrong_html_filter at line 100 (            <li><a href="/cgi-bin/koha/catalogue/export.pl?format=[% filesOption.format %]&amp;op=exportxsl&amp;file=[% filesOption.value %]&amp;bib=[% biblionumber | html %]">[% filesOption.filename %]</a></li>)
		missing_filter at line 100 (            <li><a href="/cgi-bin/koha/catalogue/export.pl?format=[% filesOption.format %]&amp;op=exportxsl&amp;file=[% filesOption.value %]&amp;bib=[% biblionumber | html %]">[% filesOption.filename %]</a></li>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc
   FAIL	  filters
		wrong_html_filter at line 27 (                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=xsl.[% xsl_export.value %]&amp;shelfid=[% shelf.shelfnumber %]">XSL - [% xsl_export.filename %]</a></li>)
		missing_filter at line 27 (                        <li><a href="/cgi-bin/koha/virtualshelves/downloadshelf.pl?format=xsl.[% xsl_export.value %]&amp;shelfid=[% shelf.shelfnumber %]">XSL - [% xsl_export.filename %]</a></li>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
   FAIL	  filters
		missing_filter at line 60 (                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=xsl.[% xsl_export.value %]&amp;bib_list=[% bib_list %]">XSL - [% xsl_export.filename %]</a></li>)
		wrong_html_filter at line 60 (                                <li><a href="/cgi-bin/koha/basket/downloadcart.pl?format=xsl.[% xsl_export.value %]&amp;bib_list=[% bib_list %]">XSL - [% xsl_export.filename %]</a></li>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
   FAIL	  filters
		missing_filter at line 860 (            <option value="[% filesOption.value %]">[% filesOption.filename %]</option>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/downloadshelf.tt
   FAIL	  filters
		missing_filter at line 40 (            <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 OK	koha-tmpl/intranet-tmpl/prog/en/xslt/biblioexport/MARC21_simple_export.xsl
   OK	  git manipulation
   OK	  xml_valid

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
   FAIL	  filters
		missing_filter at line 71 (                                        <li><a role="menuitem" href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format %]&amp;op=exportxsl&amp;file=[% filesOption.value %]&amp;bib=[% biblionumber %]">[% filesOption.filename %]</a></li>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt
   FAIL	  filters
		missing_filter at line 24 (                                    <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt
   FAIL	  filters
		missing_filter at line 63 (                                                <option value="xsl.[% xsl_export.value %]">XSL - [% xsl_export.filename %]</option>)
   OK	  forbidden patterns
   OK	  git manipulation
   OK	  spelling
   OK	  tt_valid
   OK	  valid_template

3) t/XSLT.t passes, but there is a warning that should be fixed:
t/XSLT.t .. 2/12 Use of uninitialized value $outputformat in string eq at /home/vagrant/kohaclone/C4/XSLT.pm line 404.

4) I think we should leave the example out of production. You only provide an example for MARC21 that will not work for UNIMARC and NORMARC users and that can't be removed from display unless you delete the file (and will come back on each update using packages).
Comment 26 Katrin Fischer 2018-10-28 09:48:54 UTC Comment hidden (obsolete)
Comment 27 Katrin Fischer 2018-10-28 09:48:59 UTC Comment hidden (obsolete)
Comment 28 Katrin Fischer 2018-10-28 09:49:35 UTC
comment#25!
Comment 29 Mikaël Olangcay Brisebois 2019-01-24 19:33:38 UTC Comment hidden (obsolete)
Comment 30 Mikaël Olangcay Brisebois 2019-01-24 19:35:17 UTC Comment hidden (obsolete)
Comment 31 Mikaël Olangcay Brisebois 2019-01-24 19:35:30 UTC Comment hidden (obsolete)
Comment 32 Mikaël Olangcay Brisebois 2019-01-24 19:37:50 UTC
Rebased on current master.
Comment 33 Marcel de Rooy 2019-03-22 07:42:58 UTC
QA: Looking here now
Comment 34 Marcel de Rooy 2019-03-22 09:02:40 UTC Comment hidden (obsolete)
Comment 35 Marcel de Rooy 2019-03-22 09:02:46 UTC Comment hidden (obsolete)
Comment 36 Marcel de Rooy 2019-03-22 09:02:51 UTC Comment hidden (obsolete)
Comment 37 Marcel de Rooy 2019-03-22 09:02:56 UTC Comment hidden (obsolete)
Comment 38 Marcel de Rooy 2019-03-22 09:11:27 UTC
QA Comment:
Thanks for your perseverance, guys. This took quite some time.
Since the Custom option is not checked by default, I do not see a problem pushing this in its current form. 

[1] We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.
=> See follow-up.
[2] We should add caching in CustomXSLTExportList.
=> See second follow-up.
[3] The example xslt perhaps should be renamed (as mentioned before earlier). If you would only check for the .xsl extension, we could add a README and rename the extension of the simple export sample. Since it is pref controlled now, this may be done later imo. No blocker for me.
[4] t/XSLT.t depends on a pref, so on the database. Should imo be moved to dependent. Removing Test::DBIx::Class :) No blocker, maybe later ?
[5] I personally do not like using LibXML to parse the filename and format from the xsl file. And was just thinking about adding a small json or yaml file to do the same? No blocker, maybe later..

Passed QA
Comment 39 Marcel de Rooy 2019-03-22 09:14:22 UTC
Hmm. One small thing still..
Comment 40 Marcel de Rooy 2019-03-22 09:52:57 UTC Comment hidden (obsolete)
Comment 41 Marcel de Rooy 2019-03-22 09:53:03 UTC Comment hidden (obsolete)
Comment 42 Marcel de Rooy 2019-03-22 09:53:39 UTC
Obviously, we needed two cache keys.
Comment 43 Nick Clemens 2019-03-28 19:35:59 UTC
Excellent work, this looks like a great base for future customization.

Two things:
1 - Many qa script failures - missing filters and a critic complaint on XSLT:
 FAIL	C4/XSLT.pm
   FAIL	  critic
		# BuiltinFunctions::RequireGlobFunction: Got 1 violation(s).  
		# Variables::ProhibitConditionalDeclarations: Got 1 violation(s).  

2 - I don't see the new option in lists - it works on detail and cart
Comment 44 Gabriel DeCarufel 2020-01-09 13:43:04 UTC Comment hidden (obsolete)
Comment 45 Gabriel DeCarufel 2020-01-09 13:46:29 UTC Comment hidden (obsolete)
Comment 46 Gabriel DeCarufel 2020-01-09 15:37:34 UTC Comment hidden (obsolete)
Comment 47 Gabriel DeCarufel 2020-01-09 15:37:43 UTC Comment hidden (obsolete)
Comment 48 Gabriel DeCarufel 2020-01-09 15:37:49 UTC Comment hidden (obsolete)
Comment 49 Gabriel DeCarufel 2020-01-09 15:37:55 UTC Comment hidden (obsolete)
Comment 50 Gabriel DeCarufel 2020-01-09 15:38:00 UTC Comment hidden (obsolete)
Comment 51 Gabriel DeCarufel 2020-01-09 15:45:07 UTC
Remove merge conflicts.
Fixed qa script failures - missing filters and a critic complaint on XSLT.
Comment 52 David Nind 2020-02-17 02:15:33 UTC
Patch no longer applies:

...
Applying: Bug 17385: QA Critics Fixed and added Missing Filters
error: sha1 information is lacking or useless (C4/XSLT.pm).
error: could not build fake ancestor
Patch failed at 0001 Bug 17385: QA Critics Fixed and added Missing Filters
...
Comment 53 Gabriel DeCarufel 2020-03-06 19:48:43 UTC Comment hidden (obsolete)
Comment 54 Gabriel DeCarufel 2020-03-06 19:48:52 UTC Comment hidden (obsolete)
Comment 55 Gabriel DeCarufel 2020-03-06 19:49:00 UTC Comment hidden (obsolete)
Comment 56 Gabriel DeCarufel 2020-03-06 19:49:06 UTC Comment hidden (obsolete)
Comment 57 Gabriel DeCarufel 2020-03-06 19:49:12 UTC Comment hidden (obsolete)
Comment 58 David Nind 2020-03-06 22:44:45 UTC
Thanks Gabriel, the patch now applies!

I've changed the status to Failed QA as:
- The test plan indicates it should be available for carts and lists: carts work, for lists there is no option to download (only shows RIS, BibTeX, ISBD, MARC as options).
- The tests don't pass for me.

root@ffb0d824040d:koha(bz17385)$ prove t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. Global symbol "$builder" requires explicit package name (did you forget to declare "my $builder"?) at t/db_dependent/XSLT.t line 28.
Global symbol "$builder" requires explicit package name (did you forget to declare "my $builder"?) at t/db_dependent/XSLT.t line 77.
Global symbol "$builder" requires explicit package name (did you forget to declare "my $builder"?) at t/db_dependent/XSLT.t line 85.
Global symbol "$builder" requires explicit package name (did you forget to declare "my $builder"?) at t/db_dependent/XSLT.t line 95.
Execution of t/db_dependent/XSLT.t aborted due to compilation errors.
# Looks like your test exited with 255 before it could output anything.
t/db_dependent/XSLT.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/2 subtests 

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 0.
Files=1, Tests=0,  1 wallclock secs ( 0.02 usr  0.01 sys +  0.87 cusr  0.09 csys =  0.99 CPU)
Result: FAIL

root@ffb0d824040d:koha(bz17385)$ prove t/XSLT.t
t/XSLT.t .. 2/12 
#   Failed test 'CustomXSLTExportList finds custom XSLTs'
#   at t/XSLT.t line 107.

#   Failed test 'Title is specified in root node'
#   at t/XSLT.t line 108.
Use of uninitialized value in string eq at t/XSLT.t line 109.

#   Failed test 'Title is filename if not specified'
#   at t/XSLT.t line 109.
# Looks like you failed 3 tests of 12.
t/XSLT.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 

Test Summary Report
-------------------
t/XSLT.t (Wstat: 768 Tests: 12 Failed: 3)
  Failed tests:  10-12
  Non-zero exit status: 3
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  3.63 cusr  0.14 csys =  3.79 CPU)
Result: FAIL

Notes from testing:
- Need to enable 'Custom' option for OpacExportOptions system preference.
- Naming:
  . For cart shows as: XSL - Simple Export
  . System preference OpacExportOptions shows as: Custom
  . Staff interface save shows as: Simple Export (from the sample .xsl file)
  . OPAC save record shows as: Simple Export (from the sample .xsl file)
Comment 59 Gabriel DeCarufel 2020-03-12 20:26:18 UTC Comment hidden (obsolete)
Comment 60 David Nind 2020-03-13 09:02:07 UTC Comment hidden (obsolete)
Comment 61 David Nind 2020-03-13 09:02:12 UTC Comment hidden (obsolete)
Comment 62 David Nind 2020-03-13 09:02:17 UTC Comment hidden (obsolete)
Comment 63 David Nind 2020-03-13 09:02:21 UTC Comment hidden (obsolete)
Comment 64 David Nind 2020-03-13 09:02:26 UTC Comment hidden (obsolete)
Comment 65 David Nind 2020-03-13 09:02:31 UTC Comment hidden (obsolete)
Comment 66 Katrin Fischer 2020-03-22 17:47:16 UTC
The tests are failing for me:

t/XSLT.t ............... 
1..12
ok 1 - use C4::XSLT;
ok 2 - Found test/en
ok 3 - Found test/es-ES
ok 4 - Found test/en
ok 5 - Found test/es-ES
ok 6 - Fell back to test/en for test/fr-FR
ok 7 - Fell back to prog/es-ES for nope/es-ES
ok 8 - Fell back to prog/en for nope/fr-FR
ok 9 - singleBranchMode has a value of 0
Use of uninitialized value in pattern match (m//) at /home/vagrant/kohaclone/C4/XSLT.pm line 422.
not ok 10 - CustomXSLTExportList finds custom XSLTs

#   Failed test 'CustomXSLTExportList finds custom XSLTs'
#   at t/XSLT.t line 107.
Use of uninitialized value in string eq at t/XSLT.t line 108.
not ok 11 - Title is specified in root node

#   Failed test 'Title is specified in root node'
#   at t/XSLT.t line 108.
Use of uninitialized value in string eq at t/XSLT.t line 109.
not ok 12 - Title is filename if not specified

#   Failed test 'Title is filename if not specified'
#   at t/XSLT.t line 109.
# Looks like you failed 3 tests of 12.
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 

Test Summary Report
-------------------
t/XSLT.t             (Wstat: 768 Tests: 12 Failed: 3)
  Failed tests:  10-12
  Non-zero exit status: 3
Comment 67 Ivan Dziuba 2020-10-28 17:46:41 UTC Comment hidden (obsolete)
Comment 68 Ivan Dziuba 2020-10-29 20:11:36 UTC Comment hidden (obsolete)
Comment 69 Ivan Dziuba 2020-10-29 20:11:41 UTC Comment hidden (obsolete)
Comment 70 Ivan Dziuba 2020-10-29 20:11:45 UTC Comment hidden (obsolete)
Comment 71 Ivan Dziuba 2020-10-29 20:11:49 UTC Comment hidden (obsolete)
Comment 72 Ivan Dziuba 2020-10-29 20:11:54 UTC Comment hidden (obsolete)
Comment 73 Ivan Dziuba 2020-10-29 20:11:58 UTC Comment hidden (obsolete)
Comment 74 Ivan Dziuba 2020-10-29 20:17:33 UTC
Patch rebased. I changed test 9 - singleBranchMode in order to manage the case where the libraries has multiple branches (related bug 18089)
Comment 75 Ivan Dziuba 2020-10-29 20:56:39 UTC Comment hidden (obsolete)
Comment 76 Ivan Dziuba 2020-10-29 20:56:43 UTC Comment hidden (obsolete)
Comment 77 Ivan Dziuba 2020-10-29 20:56:47 UTC Comment hidden (obsolete)
Comment 78 Ivan Dziuba 2020-10-29 20:56:51 UTC
Created attachment 112680 [details] [review]
Bug 17385: QA Critics Fixed and added Missing Filters

Signed-off-by: David Nind <david@davidnind.com>
Comment 79 Ivan Dziuba 2020-10-29 20:56:55 UTC Comment hidden (obsolete)
Comment 80 Ivan Dziuba 2020-10-29 20:56:59 UTC Comment hidden (obsolete)
Comment 81 Alexis Ripetti 2020-11-03 21:56:47 UTC Comment hidden (obsolete)
Comment 82 Alexis Ripetti 2020-11-03 21:57:31 UTC Comment hidden (obsolete)
Comment 83 Alexis Ripetti 2020-11-03 21:57:46 UTC Comment hidden (obsolete)
Comment 84 Alexis Ripetti 2020-11-03 21:58:29 UTC Comment hidden (obsolete)
Comment 85 The Minh Luong 2022-02-08 13:29:20 UTC Comment hidden (obsolete)
Comment 86 The Minh Luong 2022-02-08 13:29:26 UTC Comment hidden (obsolete)
Comment 87 The Minh Luong 2022-02-08 13:29:31 UTC Comment hidden (obsolete)
Comment 88 The Minh Luong 2022-02-08 13:29:36 UTC Comment hidden (obsolete)
Comment 89 The Minh Luong 2022-02-08 13:29:42 UTC Comment hidden (obsolete)
Comment 90 Emmanuel Bétemps 2022-02-09 14:57:07 UTC
I made 3 tests and none of them was fully satisfying.


1) to 5) : no problem

6) I had to "Restart services" for "XSL - Simple Export" to appear in the menu
(but i don't know if this really is a problem)

7) is ok

8) the downloaded file seems to be empty and contains no info on the record
Comment 91 The Minh Luong 2022-02-16 18:45:59 UTC Comment hidden (obsolete)
Comment 92 The Minh Luong 2022-02-16 18:46:05 UTC Comment hidden (obsolete)
Comment 93 The Minh Luong 2022-02-16 18:46:11 UTC Comment hidden (obsolete)
Comment 94 The Minh Luong 2022-02-16 18:46:17 UTC Comment hidden (obsolete)
Comment 95 The Minh Luong 2022-02-16 18:46:22 UTC Comment hidden (obsolete)
Comment 96 Owen Leonard 2022-03-04 12:42:31 UTC
I get an error when I try to export a record in the OPAC:

Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_opac_opac_2dexport_2epl::XSLTParse4Display called at /kohadevbox/koha/opac/opac-export.pl line 147

It works in the staff interface. The "Simple Export" doesn't seem very useful... I wonder if we shouldn't have a more complex example?

"<p xmlns:marc="http://www.loc.gov/MARC21/slim">The chronicles of Narnia / C.S. Lewis ; with illustrations by Pauline Baynes.<br>New York : HarperCollinsPublishers, 2001.</p>"

The changes to opac-detail-sidebar.inc are reverting some updates we don't want to lose. Please double-check to make sure you're only making essential changes there.

Finally, there are QA warnings. Please run the QA tool to check.
Comment 97 The Minh Luong 2022-03-08 16:24:36 UTC Comment hidden (obsolete)
Comment 98 The Minh Luong 2022-03-29 20:28:13 UTC
Created attachment 132488 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 99 The Minh Luong 2022-03-29 20:28:20 UTC
Created attachment 132489 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 100 The Minh Luong 2022-03-29 20:28:29 UTC
Created attachment 132490 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 101 The Minh Luong 2022-03-29 20:28:35 UTC
Created attachment 132491 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 102 The Minh Luong 2022-03-29 20:28:42 UTC
Created attachment 132492 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 103 The Minh Luong 2022-03-29 20:28:49 UTC
Created attachment 132493 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 104 The Minh Luong 2022-03-30 12:13:38 UTC
Created attachment 132581 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 105 The Minh Luong 2022-04-20 19:45:40 UTC
Created attachment 133498 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 106 The Minh Luong 2022-04-20 19:45:46 UTC
Created attachment 133499 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 107 The Minh Luong 2022-04-20 19:45:52 UTC
Created attachment 133500 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 108 The Minh Luong 2022-04-20 19:45:58 UTC
Created attachment 133501 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 109 The Minh Luong 2022-04-20 19:46:05 UTC
Created attachment 133502 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 110 The Minh Luong 2022-04-20 19:46:11 UTC
Created attachment 133503 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 111 The Minh Luong 2022-04-20 19:46:18 UTC
Created attachment 133504 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 112 Shi Yao Wang 2022-07-22 14:36:29 UTC
Created attachment 138031 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 113 Shi Yao Wang 2022-07-22 14:36:34 UTC
Created attachment 138032 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 114 Shi Yao Wang 2022-07-22 14:36:40 UTC
Created attachment 138033 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 115 Shi Yao Wang 2022-07-22 14:36:45 UTC
Created attachment 138034 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 116 Shi Yao Wang 2022-07-22 14:36:51 UTC
Created attachment 138035 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 117 Shi Yao Wang 2022-07-22 14:36:57 UTC
Created attachment 138036 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 118 Shi Yao Wang 2022-07-22 14:37:04 UTC
Created attachment 138037 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 119 David Nind 2022-07-25 00:46:51 UTC
Apologies, I was too slow to retest - the patches no longer apply 8-(..

Applying: Bug 17385: Add custom export XSLT
.git/rebase-apply/patch:163: trailing whitespace.
} else { 
.git/rebase-apply/patch:166: trailing whitespace.
    $template->param(bib_list => $bib_list); 
warning: 2 lines add whitespace errors.
Using index info to reconstruct a base tree...
M	basket/basket.pl
M	basket/downloadcart.pl
M	catalogue/detail.pl
M	catalogue/export.pl
M	koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
M	opac/opac-detail.pl
M	opac/opac-downloadcart.pl
M	opac/opac-downloadshelf.pl
M	opac/opac-export.pl
M	virtualshelves/downloadshelf.pl
M	virtualshelves/shelves.pl
.git/rebase-apply/patch:163: trailing whitespace.
} else { 
.git/rebase-apply/patch:166: trailing whitespace.
    $template->param(bib_list => $bib_list); 
warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging virtualshelves/shelves.pl
Auto-merging virtualshelves/downloadshelf.pl
Auto-merging opac/opac-export.pl
CONFLICT (content): Merge conflict in opac/opac-export.pl
Auto-merging opac/opac-downloadshelf.pl
CONFLICT (content): Merge conflict in opac/opac-downloadshelf.pl
Auto-merging opac/opac-downloadcart.pl
CONFLICT (content): Merge conflict in opac/opac-downloadcart.pl
Auto-merging opac/opac-detail.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
Auto-merging catalogue/export.pl
Auto-merging catalogue/detail.pl
Auto-merging basket/downloadcart.pl
Auto-merging basket/basket.pl
error: Failed to merge in the changes.
Patch failed at 0001 Bug 17385: Add custom export XSLT
Comment 120 Shi Yao Wang 2022-07-25 12:57:30 UTC
Created attachment 138082 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 121 Shi Yao Wang 2022-07-25 12:57:36 UTC
Created attachment 138083 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 122 Shi Yao Wang 2022-07-25 12:57:43 UTC
Created attachment 138084 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 123 Shi Yao Wang 2022-07-25 12:57:53 UTC
Created attachment 138085 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 124 Shi Yao Wang 2022-07-25 12:58:03 UTC
Created attachment 138086 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 125 Shi Yao Wang 2022-07-25 12:58:14 UTC
Created attachment 138087 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 126 Shi Yao Wang 2022-07-25 12:58:20 UTC
Created attachment 138088 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 127 Shi Yao Wang 2022-07-25 12:59:52 UTC
Rebased
Comment 128 David Nind 2022-07-25 22:11:24 UTC
Thanks Shi Yao, the patches now apply!

However, I've changed the status to Failed QA as there are:

1. Error traces after the patches are applied:

   a. See error traces for the staff interface - see [1], [2], and [3] (occurs if the 'XSL - Simple Export' option for OpacExportOptions is either selected or not selected).

   b. See error traces for the OPAC - see [4].

2. If the 'XSL - Simple Export' option for OpacExportOptions is not selected, it still appears in the staff interface record details page as a save option.

3. The t/XSLT.t tests fail - see [5].

There is no option in the OPAC cart and lists to download as 'XSL - Simple Export' - I'm not sure whether there should be or not...

Consolidated test plan so far:
1. Before applying the patches run the tests - these should pass:
   a. prove -l t/XSLT.t
   b. prove -l t/db_dependent/XSLT.t
2. Check current download and save options:
   a. OpacExportOptions system preference: all options selected, note that there is no 'XSL - Simple Export' option.
   b. for both the OPAC and the staff interface:
      (i) search and add some selected items to the cart: check the download options - there is no 'XSL - Simple Export' option
      (ii) search and add some items to a new list: check the download lists options - there is no 'XSL - Simple Export' option
      (iii) from the details page for a record in the OPAC: check the save record options in the right sidebar, there is no 'XSL - Simple Export' option
      (iv) from the details page for a record in the staff interface: check the save record options from the menu bar, there is no 'XSL - Simple Export' option
4. Apply the patches and reload everything (flush_memcached, restart_all, clear your browser cache (or use an incognito/private window)).
5. For the OpacExportOptions system preference, select the new option 'XSL - Simple Export'.
6. Repeat step 2 - there should now be an 'XSL - Simple Export' option available for download or saving.
7. Select the 'XSL - Simple Export' in all the paces it appears in the OPAC and  staff interface - an HTML file should be downloaded.
8. Open the HTML file - you should see the record's information.
9. Run the tests - they should pass:
   a. prove -l t/XSLT.t
   b. prove -l t/db_dependent/XSLT.t

[1] Error trace after clicking on the cart in the staff interface: 
   
    Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_basket_basket_2epl::CustomXSLTExportList called at /kohadevbox/koha/basket/basket.pl line 120
    ....

[2] Error trace when accessing the lists from the staff interface:

    Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_virtualshelves_shelves_2epl::CustomXSLTExportList called at /kohadevbox/koha/virtualshelves/shelves.pl line 381
    ....

[3] Error trace when selecting Save > XSL - Simple Export from a record's details page in the staff interface:

    Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_catalogue_export_2epl::GetMarcBiblio called at /kohadevbox/koha/catalogue/export.pl line 95
    ....

[4] Error trace when selecting Save record > XSL - Simple Export from a record's details page in the OPAC:
    
    Undefined subroutine &C4::Biblio::GetMarcBiblio called at /kohadevbox/koha/opac/opac-export.pl line 145
    ....

[5] Failed tests for t/XSLT.t

prove -l t/XSLT.t
t/XSLT.t .. 2/12 
#   Failed test 'CustomXSLTExportList finds custom XSLTs'
#   at t/XSLT.t line 107.

#   Failed test 'Title is specified in root node'
#   at t/XSLT.t line 108.
Use of uninitialized value in string eq at t/XSLT.t line 109.

#   Failed test 'Title is filename if not specified'
#   at t/XSLT.t line 109.
# Looks like you failed 3 tests of 12.
t/XSLT.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 

Test Summary Report
-------------------
t/XSLT.t (Wstat: 768 Tests: 12 Failed: 3)
  Failed tests:  10-12
  Non-zero exit status: 3
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.01 sys +  3.46 cusr  0.19 csys =  3.68 CPU)
Result: FAIL
Comment 129 Shi Yao Wang 2022-07-26 14:14:30 UTC Comment hidden (obsolete)
Comment 130 Shi Yao Wang 2022-07-26 14:21:27 UTC
(In reply to David Nind from comment #128)
> Thanks Shi Yao, the patches now apply!
> 
> However, I've changed the status to Failed QA as there are:
> 
> 1. Error traces after the patches are applied:
> 
>    a. See error traces for the staff interface - see [1], [2], and [3]
> (occurs if the 'XSL - Simple Export' option for OpacExportOptions is either
> selected or not selected).
> 
>    b. See error traces for the OPAC - see [4].
> 
> 2. If the 'XSL - Simple Export' option for OpacExportOptions is not
> selected, it still appears in the staff interface record details page as a
> save option.
> 
> 3. The t/XSLT.t tests fail - see [5].

1. There shouldn't be any errors now

2. The system preference has the word "Opac" in it so I assume it only affects OPAC interface and not the staff interface

3. Couldn't run the test on my machine because I have trouble installing Test::DBIx::Class. Hope it works
Comment 131 Shi Yao Wang 2022-08-17 12:48:16 UTC
Created attachment 139277 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 132 Shi Yao Wang 2022-08-17 12:48:23 UTC
Created attachment 139278 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 133 Shi Yao Wang 2022-08-17 12:48:29 UTC
Created attachment 139279 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 134 Shi Yao Wang 2022-08-17 12:48:35 UTC
Created attachment 139280 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 135 Shi Yao Wang 2022-08-17 12:48:43 UTC
Created attachment 139281 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 136 Shi Yao Wang 2022-08-17 12:48:49 UTC
Created attachment 139282 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 137 Shi Yao Wang 2022-08-17 12:48:57 UTC
Created attachment 139283 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 138 Shi Yao Wang 2022-08-17 12:49:05 UTC
Created attachment 139284 [details] [review]
Bug 17385: Add missing imports and equivalent code for GetMarcBiblio
Comment 139 Shi Yao Wang 2022-08-17 12:49:57 UTC
Rebase
Comment 140 Shi Yao Wang 2022-09-30 14:11:55 UTC
Created attachment 141157 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 141 Shi Yao Wang 2022-09-30 14:12:02 UTC
Created attachment 141158 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 142 Shi Yao Wang 2022-09-30 14:12:09 UTC
Created attachment 141159 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 143 Shi Yao Wang 2022-09-30 14:12:16 UTC
Created attachment 141160 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 144 Shi Yao Wang 2022-09-30 14:12:22 UTC
Created attachment 141161 [details] [review]
Bug 17385: Add custum export format option when saving a record

This patch adds "XSL-Simple Export" when saving a bibliographic
record. Previous patches are combined into this one.

To test:
1) Search for a record in the intranet.
2) Click on the "Save" button and observe the dropdown menu.
3) Notice that "XSL- Simple Export" is not in the menu.
4) Apply the patch.
5) Repeat the steps 1 and 2.
6) Notice that "XSL - Simple Export" is in the menu.
7) Click on "XSL - Simple Export". A .html file should be downloaded.
8) Open the .html file. You should see the record's informations.
Comment 145 Shi Yao Wang 2022-09-30 14:12:31 UTC
Created attachment 141162 [details] [review]
Bug 17385: Correction of opac-detail-sidebar.inc

This patch reverts the changes made in opac-detail-sidebar.inc, so the sidebar is
displayed as wanted. Tests are now passing properly.

TEST PLAN:
1- Apply the patch and search for a record in the OPAC.
2- Click on "Save record". Notice that the dropdown menu is unchanged.
3- Run t/db_dependent/XSLT.t (All tests should pass)
Comment 146 Shi Yao Wang 2022-09-30 14:12:38 UTC
Created attachment 141163 [details] [review]
Bug 17385: Fixing display for XSL-Simple Export in OPAC

This attachment correct the placement of XSL-Simple Export in the OPAC's page.
It is now displayed in the "Save record" dropdown menu.
Comment 147 Shi Yao Wang 2022-09-30 14:12:45 UTC
Created attachment 141164 [details] [review]
Bug 17385: Add missing imports and equivalent code for GetMarcBiblio
Comment 148 David Nind 2022-10-06 23:24:17 UTC
Hi Shi Yao Wang.

I've retested, using the consolidated test plan in comment #128 - please provide an update if anything for testing needs changing.

Things I've noted - and the reasons for changing to Failed QA:

1. For the staff interface:
   - For an individual record, the Save > XSL - Simple Export works as expected
   - For the cart and lists: 
     . XSL - Simple Export appears in the list of download options   
     . there are error traces if this option is selected

Error trace - staff interface cart:
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_basket_downloadcart_2epl::XSLTParse4Display called at /kohadevbox/koha/basket/downloadcart.pl line 83.
 at /kohadevbox/koha/basket/downloadcart.pl line 71

Error trace - staff interface lists:
Undefined subroutine &CGI::Compile::ROOT::kohadevbox_koha_virtualshelves_downloadshelf_2epl::XSLTParse4Display called at /kohadevbox/koha/virtualshelves/downloadshelf.pl line 85.
 at /kohadevbox/koha/virtualshelves/downloadshelf.pl line 75

2. For the OPAC:
   - For an individual record, the Save record > XSL - Simple Export works as expected
   - For the cart and lists: XSL - Simple Export does not appear in the list of download options

3. Tests fail for prove -l t/XSLT.t:

root@kohadevbox:koha(bz17385)$ prove -l t/XSLT.t
t/XSLT.t .. 2/12 
#   Failed test 'CustomXSLTExportList finds custom XSLTs'
#   at t/XSLT.t line 107.

#   Failed test 'Title is specified in root node'
#   at t/XSLT.t line 108.
Use of uninitialized value in string eq at t/XSLT.t line 109.

#   Failed test 'Title is filename if not specified'
#   at t/XSLT.t line 109.
# Looks like you failed 3 tests of 12.
t/XSLT.t .. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/12 subtests 

Test Summary Report
-------------------
t/XSLT.t (Wstat: 768 Tests: 12 Failed: 3)
  Failed tests:  10-12
  Non-zero exit status: 3
Files=1, Tests=12,  5 wallclock secs ( 0.02 usr  0.00 sys +  3.91 cusr  0.17 csys =  4.10 CPU)
Result: FAIL
Comment 149 Hammat wele 2022-11-29 20:23:53 UTC Comment hidden (obsolete)
Comment 150 Hammat wele 2022-11-29 20:57:57 UTC Comment hidden (obsolete)
Comment 151 Hammat wele 2022-12-01 15:10:40 UTC Comment hidden (obsolete)
Comment 152 Hammat wele 2022-12-01 21:19:48 UTC Comment hidden (obsolete)
Comment 153 Hammat wele 2023-05-11 20:39:47 UTC
Created attachment 151095 [details] [review]
Bug 17385: Add custom export XSLT

Rebase
Comment 154 Hammat wele 2023-05-11 20:39:54 UTC
Created attachment 151096 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t
Comment 155 Hammat wele 2023-05-11 20:40:01 UTC
Created attachment 151097 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 156 Hammat wele 2023-05-11 20:40:08 UTC
Created attachment 151098 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>
Comment 157 Hammat wele 2023-05-11 20:40:15 UTC
Created attachment 151099 [details] [review]
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList

This patch adds 'XSL-Simple Export' to the cart and the lists and correct the fail test in t/XSLT.t
it contains Add custum export format option when saving a record

TO TEST:

Before applying:
1) Search for a record in the intranet.
2) Click on the 'Save' button and observe the dropdown menu.
    --> There is no 'XSL- Simple Export' in the dropdown menu.
3) Apply the patch.
4) In System preferences search for OpacExportOptions and enable XSL
5) Repeat the steps 1 and 2.
    ---> There is now 'XSL- Simple Export'  option in the dropdown menu
6) Click on 'XSL - Simple Export'. a .html file should be downloaded.
7) Open the .html file. You should see the record's informations.
8) Add some items to your Cart
9) Open the Cart
10) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
11) Add some items to a List
12) Open the List
13) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
14) Do the same steps in OPAC
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
15) In System preferences search for OpacExportOptions and disable XSL
16) Repeat all steps
17) Notice that 'XSL - Simple Export' is no more in the menus.
18) Run prove -l t/XSLT.t
Comment 158 David Nind 2023-05-11 21:50:06 UTC
Created attachment 151102 [details] [review]
Bug 17385: Add custom export XSLT

Rebase

Signed-off-by: David Nind <david@davidnind.com>
Comment 159 David Nind 2023-05-11 21:50:10 UTC
Created attachment 151103 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 160 David Nind 2023-05-11 21:50:15 UTC
Created attachment 151104 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 161 David Nind 2023-05-11 21:50:19 UTC
Created attachment 151105 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>

Signed-off-by: David Nind <david@davidnind.com>
Comment 162 David Nind 2023-05-11 21:50:24 UTC
Created attachment 151106 [details] [review]
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList

This patch adds 'XSL-Simple Export' to the cart and the lists and correct the fail test in t/XSLT.t
it contains Add custum export format option when saving a record

TO TEST:

Before applying:
1) Search for a record in the intranet.
2) Click on the 'Save' button and observe the dropdown menu.
    --> There is no 'XSL- Simple Export' in the dropdown menu.
3) Apply the patch.
4) In System preferences search for OpacExportOptions and enable XSL
5) Repeat the steps 1 and 2.
    ---> There is now 'XSL- Simple Export'  option in the dropdown menu
6) Click on 'XSL - Simple Export'. a .html file should be downloaded.
7) Open the .html file. You should see the record's informations.
8) Add some items to your Cart
9) Open the Cart
10) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
11) Add some items to a List
12) Open the List
13) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
14) Do the same steps in OPAC
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
15) In System preferences search for OpacExportOptions and disable XSL
16) Repeat all steps
17) Notice that 'XSL - Simple Export' is no more in the menus.
18) Run prove -l t/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 163 Hammat wele 2023-05-17 19:36:57 UTC
Created attachment 151377 [details] [review]
Bug 17385: Add custom export XSLT

Rebase

Signed-off-by: David Nind <david@davidnind.com>
Comment 164 Hammat wele 2023-05-17 19:37:03 UTC
Created attachment 151378 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 165 Hammat wele 2023-05-17 19:37:09 UTC
Created attachment 151379 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 166 Hammat wele 2023-05-17 19:37:14 UTC
Created attachment 151380 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>

Signed-off-by: David Nind <david@davidnind.com>
Comment 167 Hammat wele 2023-05-17 19:37:20 UTC
Created attachment 151381 [details] [review]
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList

This patch adds 'XSL-Simple Export' to the cart and the lists and correct the fail test in t/XSLT.t
it contains Add custum export format option when saving a record

TO TEST:

Before applying:
1) Search for a record in the intranet.
2) Click on the 'Save' button and observe the dropdown menu.
    --> There is no 'XSL- Simple Export' in the dropdown menu.
3) Apply the patch.
4) In System preferences search for OpacExportOptions and enable XSL
5) Repeat the steps 1 and 2.
    ---> There is now 'XSL- Simple Export'  option in the dropdown menu
6) Click on 'XSL - Simple Export'. a .html file should be downloaded.
7) Open the .html file. You should see the record's informations.
8) Add some items to your Cart
9) Open the Cart
10) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
11) Add some items to a List
12) Open the List
13) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
14) Do the same steps in OPAC
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
15) In System preferences search for OpacExportOptions and disable XSL
16) Repeat all steps
17) Notice that 'XSL - Simple Export' is no more in the menus.
18) Run prove -l t/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 168 Hammat wele 2023-08-11 15:58:47 UTC
Created attachment 154379 [details] [review]
Bug 17385: Add custom export XSLT

Rebase

Signed-off-by: David Nind <david@davidnind.com>
Comment 169 Hammat wele 2023-08-11 15:59:42 UTC
Created attachment 154380 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 170 Hammat wele 2023-08-11 16:00:19 UTC
Created attachment 154381 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 171 Hammat wele 2023-08-11 16:01:00 UTC
Created attachment 154382 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>

Signed-off-by: David Nind <david@davidnind.com>
Comment 172 Hammat wele 2023-08-11 16:01:50 UTC
Created attachment 154383 [details]
Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList

This patch adds 'XSL-Simple Export' to the cart and the lists and correct the fail test in t/XSLT.t
it contains Add custum export format option when saving a record

TO TEST:

Before applying:
1) Search for a record in the intranet.
2) Click on the 'Save' button and observe the dropdown menu.
    --> There is no 'XSL- Simple Export' in the dropdown menu.
3) Apply the patch.
4) In System preferences search for OpacExportOptions and enable XSL
5) Repeat the steps 1 and 2.
    ---> There is now 'XSL- Simple Export'  option in the dropdown menu
6) Click on 'XSL - Simple Export'. a .html file should be downloaded.
7) Open the .html file. You should see the record's informations.
8) Add some items to your Cart
9) Open the Cart
10) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
11) Add some items to a List
12) Open the List
13) Click on the 'Download' and 'XSL - Simple Export'.
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
14) Do the same steps in OPAC
    ----> a .html file should be downloaded.
    ----> you should see the record's informations in the downloaded file.
15) In System preferences search for OpacExportOptions and disable XSL
16) Repeat all steps
17) Notice that 'XSL - Simple Export' is no more in the menus.
18) Run prove -l t/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 173 Hammat wele 2023-08-11 16:04:29 UTC
Rebase
Comment 174 Katrin Fischer 2023-10-08 20:07:13 UTC
Hi Hamat, 

can you please rebase and re-attach all patches? 

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 17385: Add custom export XSLT
Applying: Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder
Applying: Bug 17385: (QA follow-up) Add caching
Applying: Bug 17385: Add tests for CustomXSLTExportList
Applying: Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/includes/virtualshelves-toolbar.inc).
error: could not build fake ancestor
Patch failed at 0001 Bug 17385: (Fix) Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList


Please also run the QA test tools and fix the commit message of the last patch (Fix) should get you a warning in the tests.
Comment 175 Hammat wele 2023-10-11 11:53:37 UTC
Created attachment 156815 [details] [review]
Bug 17385: Add custom export XSLT

Rebase

Signed-off-by: David Nind <david@davidnind.com>
Comment 176 Hammat wele 2023-10-11 11:53:43 UTC
Created attachment 156816 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 177 Hammat wele 2023-10-11 11:53:48 UTC
Created attachment 156817 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 178 Hammat wele 2023-10-11 11:53:54 UTC
Created attachment 156818 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>

Signed-off-by: David Nind <david@davidnind.com>
Comment 179 Hammat wele 2023-10-11 11:54:00 UTC
Created attachment 156819 [details] [review]
Bug 17385: Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList
Comment 180 Katrin Fischer 2023-11-04 19:30:27 UTC
I can see we had a lot of iterations here already. I did some testing to help out, but I think I'll leave it to Marcel to finish:

1) QA test tools

We have a fail for TT filters:

 FAIL	koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc
   FAIL	  filters
		wrong_html_filter at line 90 (                                    <a href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format | html %]&amp;op=exportxsl&amp;file=[% filesOption.value | html %]&amp;bib=[% biblionumber | html %]" >XSL - [% filesOption.filename | html %]</a>)
		wrong_html_filter at line 90 (                                    <a href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format | html %]&amp;op=exportxsl&amp;file=[% filesOption.value | html %]&amp;bib=[% biblionumber | html %]" >XSL - [% filesOption.filename | html %]</a>)
		wrong_html_filter at line 90 (                                    <a href="/cgi-bin/koha/opac-export.pl?format=[% filesOption.format | html %]&amp;op=exportxsl&amp;file=[% filesOption.value | html %]&amp;bib=[% biblionumber | html %]" >XSL - [% filesOption.filename | html %]</a>)

... and a lot of perltidy warns.

2) Export format pull down

+            <li><a href="/cgi-bin/koha/catalogue/export.pl?format=[% filesOption.format | uri %]&amp;op=exportxsl&amp;file=[% filesOption.value | uri %]&amp;bib=[% biblionumber | uri %]">XSL - [% filesOption.filename | html %]</a></li>

and other occurences.

As we are not exporting an XSL file, it would be nice to rephrase this. Maybe we should just remove XSL in favor of just having the file name?


3) Export format description

In the system preference we have:
+                custom: XSL - Simple Export

* Capitalization
* We don't export XSL, I believe something like: Simple HTML format would probably be a better match?
* It would also guide any other added custom export format, if I understand correctly, so maybe even: Custom export formats, including simple HTML?

+    $format = "html" if ($format =~ /^xsl\./);

It looks like we always assume it will be an HTML file?

4) Commit messages include no test plan.

5) New option for system preference

I think we need a database update adding the option to OpacExportOptions and also update sysprefs.sql.

6) I am struggling with adding the sample files to Koha. They are great for testing this, but I am not sure if they are helpful as they are. At the moment, they are incomplete/invalid HTML files. 

<p xmlns:marc="http://www.loc.gov/MARC21/slim">Programming Perl / Tom Christiansen, Brian D. Foy &amp; Larry Wall.<br>Beijing ; O'Reilly, c2012.</p>

7) The path for the custom formats is not configurable. I guess any files added there by libraries could be potentially be overwritten in updates. If this is for custom formats, maybe we should allow for a custom path as well.


Overall the concept here feels a little rough.
Comment 181 Emily-Rose Francoeur 2023-11-08 21:36:52 UTC
Hi Katrin,
I ran the QA Test Tools, and I couldn't find any errors or warnings. What parameters did you use to get errors and warnings for the opac-detail-sidebar.inc file ? On my end, I ran koha-qa.pl -v 2 -c 5 on a git installation. I use the most recent version of master and only apply the patch for this bug.
Comment 182 Emily-Rose Francoeur 2023-11-09 16:44:24 UTC
I'd like to provide some clarification regarding point 6. Initially, this patch was created so that students could have a file containing the basic notices informations. This would enable them to copy and paste these informations more easily into their assignments. Therefore, HTML files are not generated for importing notices afterward, which is why they are incomplete/invalid for import.
I also have some questions regarding point 7. To make sure I understand correctly, should we add a system preference (e.g., CustomExportFilePath) so that libraries can choose where they want to place their custom XSL file? If no path is specified, would the default path be to the "MARC21_simple_export.xsl" files? Additionally, should we consider renaming these files to "MARC21CustomSimpleExport.xsl" to align with the naming conventions of other .xsl files?
Comment 183 Katrin Fischer 2023-11-09 18:35:59 UTC
(In reply to Emily-Rose Francoeur from comment #181)
> Hi Katrin,
> I ran the QA Test Tools, and I couldn't find any errors or warnings. What
> parameters did you use to get errors and warnings for the
> opac-detail-sidebar.inc file ? On my end, I ran koha-qa.pl -v 2 -c 5 on a
> git installation. I use the most recent version of master and only apply the
> patch for this bug.

I use the tools without any additional params as "git qa" in ktd. 

Do you have the latest version of QA script? (separate repository from Koha)
Comment 184 Katrin Fischer 2023-11-09 18:38:11 UTC
(In reply to Emily-Rose Francoeur from comment #182)
> I'd like to provide some clarification regarding point 6. Initially, this
> patch was created so that students could have a file containing the basic
> notices informations. This would enable them to copy and paste these
> informations more easily into their assignments. Therefore, HTML files are
> not generated for importing notices afterward, which is why they are
> incomplete/invalid for import.

I didn't assume they were for import or export, but I think it would not be hard to add the necessary HTML elements to make it a valid file. This will also avoid issues with display in different browsers that might handle invalid diffferently.


> I also have some questions regarding point 7. To make sure I understand
> correctly, should we add a system preference (e.g., CustomExportFilePath) so
> that libraries can choose where they want to place their custom XSL file? If
> no path is specified, would the default path be to the
> "MARC21_simple_export.xsl" files? Additionally, should we consider renaming
> these files to "MARC21CustomSimpleExport.xsl" to align with the naming
> conventions of other .xsl files?

I need a bit more time for this one.
Comment 185 Emily-Rose Francoeur 2023-11-13 15:51:32 UTC
(In reply to Katrin Fischer from comment #183)
> Do you have the latest version of QA script? (separate repository from Koha)

Yes, I use the last version of QA Test Tools : https://wiki.koha-community.org/wiki/QA_Test_Tools
Comment 186 Martin Renvoize 2023-11-14 11:58:50 UTC
I can confirm the QA script failures.. 'ktd pull -> ktd up -> ktd --shell -> qa'

I tend to run `qa --more-tests` but that won't make any difference here other than to try and run some additional tests if it thinks there are any related.
Comment 187 Martin Renvoize 2023-11-14 12:01:50 UTC
I also agree the hardcoded xslt filepath is incorrect.. those files would get wiped out/replaced at any upgrade as they're assumed to be community maintained. The other xslt driven preferences take a path to allow for overriden sheets that you maintain yourselves.

In most cases those custom versions would be under /var/lib/koha/*site*/ for example.. these won't get nuked at upgrades.
Comment 188 Emily-Rose Francoeur 2023-11-20 19:32:03 UTC
Created attachment 159142 [details] [review]
Bug 17385: Add custom export XSLT

Rebase

Signed-off-by: David Nind <david@davidnind.com>
Comment 189 Emily-Rose Francoeur 2023-11-20 19:32:09 UTC
Created attachment 159143 [details] [review]
Bug 17385: (QA follow-up) Do not needlessly scan biblioexport folder

Performance: We need to return an empty list if OpacExportOptions does not contain Custom.  No need to scan the directory for custom files, if we are not using them at all.

Note: The test only pertains to OPAC now, since the pref should not control intranet behavior. We have no intranet counterpart. See further next follow-up.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: David Nind <david@davidnind.com>
Comment 190 Emily-Rose Francoeur 2023-11-20 19:32:14 UTC
Created attachment 159144 [details] [review]
Bug 17385: (QA follow-up) Add caching

Performance: We should add caching in CustomXSLTExportList.

Note: This resolves the lack of an intranet test in the former patch too.

Test plan:
Run t/db_dependent/XSLT.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: David Nind <david@davidnind.com>
Comment 191 Emily-Rose Francoeur 2023-11-20 19:32:20 UTC
Created attachment 159145 [details] [review]
Bug 17385: Add tests for CustomXSLTExportList

Tests are now in one patch.
One test does not pass and I am not able to fix it.

The test who fails :

<pre>
$ prove -l t/db_dependent/XSLT.t
t/db_dependent/XSLT.t .. 1/3
    #   Failed test 'This list comes from the cache and that is fine'
    #   at t/db_dependent/XSLT.t line 122.
    #          got: '1'
    #     expected: '2'
    # Looks like you failed 1 test of 1.

 #   Failed test 'CustomXSLTExportList: Caching'
 #   at t/db_dependent/XSLT.t line 124.
 # Looks like you failed 1 test of 3.
t/db_dependent/XSLT.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests

Test Summary Report
-------------------
t/db_dependent/XSLT.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  2
  Non-zero exit status: 1
Files=1, Tests=3,  3 wallclock secs ( 0.03 usr  0.00 sys +  1.74 cusr  0.14 csys =  1.91 CPU)
Result: FAIL
</pre>

This one works fine :

<pre>
$ prove -l t/XSLT.t
t/XSLT.t .. ok
All tests successful.
Files=1, Tests=12,  4 wallclock secs ( 0.02 usr  0.00 sys +  2.55 cusr  0.17 csys =  2.74 CPU)
Result: PASS
</pre>

Signed-off-by: David Nind <david@davidnind.com>
Comment 192 Emily-Rose Francoeur 2023-11-20 19:32:25 UTC
Created attachment 159146 [details] [review]
Bug 17385: Add custum export format option to the cart and the lists and fix tests for CustomXSLTExportList
Comment 193 Emily-Rose Francoeur 2023-11-20 19:32:31 UTC
Created attachment 159147 [details] [review]
Bug 17385: (QA follow-up) Add CustomXSLTExportPath & improve descriptions

Here is a summary the corrections :
 - Addressed all warnings and failures identified by the QA testing tool
 - Revised the description of the export format (Removed all instances of 'XSL - ')
 - Updated the description of the custom option in the OpacExportOptions system
   preference
 - Corrected the MARC21_simple_export.xsl file to generate a valid HTML file
 - Introduced the new preference system CustomXSLTExportPath, allowing users to choose the path for the custom XSL files
 - Updated the sysprefs.sql file for OpacExportOptions and CustomXSLTExportPath
 - Added a new atomic update file for OpacExportOptions and CustomXSLTExportPath
 - Updated XSLT tests (t/db_dependent/XSLT.t)

NEW TEST PLAN
Prerequisites:
 - Have more than one record in your catalog

Test steps:
1) Search for a record in the intranet
2) Click on the 'Save' button and observe the dropdown menu
    ---> There is no 'Simple Export' in the dropdown menu
3) Apply the patch
4) In 'Koha administration > System preferences' search 'OpacExportOptions'
5) Enable 'Simple HTML formats' and click on 'Save all OPAC preferences'
6) Repeat steps 1 and 2
    ---> There is now 'Simple Export' option in the dropdown menu
7) Click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the record informations in the downloaded file
8) Add some item to your Cart
9) Open your Cart
10) Click on the 'Download' button, then click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the records informations in the downloaded file
11) Add some items to a list
12) Open the list
13) Click on the 'Download list' button, then click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the records informations in the downloaded file
14) Do the same steps in OPAC (steps 6 to 13)
15) On your computer, create a folder that will contain the xsl files in the attachment
16 [review]) In the intranet, go to 'Koha administration > System preferences' and search for 'CustomXSLTExportPath'
17) Write the full path to your created folder and click on the 'Save all Cataloging preferences'
18) Repeat steps 6 to 14 (no need to download this time, only check that 'Simple Export 1' and 'Simple Export 2' are displaying when you click on the 'Save'/'Download'/'Download list' button)
19) In the system preferences search for OpacExportOptions and disable 'Simple HTML formats'
20) Repeat steps 6 to 13 in OPAC
    ---> Notice that 'Simple Export 1' and 'Simple Export 2' are not in the menu anymore
21) Run 'prove t/db_dependent/XSLT.t'
Comment 194 Emily-Rose Francoeur 2023-11-20 19:35:43 UTC
Created attachment 159148 [details]
XSLT test files
Comment 195 Matthias Le Gac 2024-03-21 14:33:52 UTC
Created attachment 163623 [details] [review]
Bug 17385: (QA follow-up) Add CustomXSLTExportPath & improve descriptions

TEST PLAN
Prerequisites:
 - Have more than one record in your catalog

Test steps:
1) Search for a record in the intranet
2) Click on the 'Save' button and observe the dropdown menu
    ---> There is no 'Simple Export' in the dropdown menu
3) Apply the patch
4) In 'Koha administration > System preferences' search 'OpacExportOptions'
5) Enable 'Simple HTML formats' and click on 'Save all OPAC preferences'
6) Repeat steps 1 and 2
    ---> There is now 'Simple Export' option in the dropdown menu
7) Click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the record informations in the downloaded file
8) Add some item to your Cart
9) Open your Cart
10) Click on the 'Download' button, then click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the records informations in the downloaded file
11) Add some items to a list
12) Open the list
13) Click on the 'Download list' button, then click on 'Simple Export'
    ---> a .html file should be downloaded
    ---> you should see the records informations in the downloaded file
14) Do the same steps in OPAC (steps 6 to 13)
15) On your computer, create a folder that will contain the xsl files in the attachment
16 [review] [review]) In the intranet, go to 'Koha administration > System preferences' and search for 'CustomXSLTExportPath'
17) Write the full path to your created folder and click on the 'Save all Cataloging preferences'
18) Repeat steps 6 to 14 (no need to download this time, only check that 'Simple Export 1' and 'Simple Export 2' are displaying when you click on the 'Save'/'Download'/'Download list' button)
19) In the system preferences search for OpacExportOptions and disable 'Simple HTML formats'
20) Repeat steps 6 to 13 in OPAC
    ---> Notice that 'Simple Export 1' and 'Simple Export 2' are not in the menu anymore
21) Run 'prove t/db_dependent/XSLT.t'
Comment 196 Laurence Rault 2024-04-11 15:24:06 UTC
When viewing a record, opac or staff : 
Could not compile /kohadevbox/koha/opac/opac-detail.pl: "CustomXSLTExportList" is not exported by the C4::XSLT module
Could not compile /kohadevbox/koha/catalogue/detail.pl: "CustomXSLTExportList" is not exported by the C4::XSLT module
Comment 197 Matthias Le Gac 2024-04-11 19:56:09 UTC
I don't understand your problem because when I run the test plan, everything works and I don't get any errors.
Comment 198 Laurence Rault 2024-04-12 07:54:33 UTC
Got those errors on kdt and on Biblibre's sandboxes.
No error in PTFS's sandbox.

Tested : everything works OK until 14.
From 15 it is not possible to test on a sandbox.
Comment 199 Laurence Rault 2024-04-12 08:00:46 UTC
I have forgotten : 
html files are exported in ISO-8859 encoding, ot utf8, some diacritics are not well encoded in the file, example éèàêë
Comment 200 Matthias Le Gac 2024-04-12 17:29:18 UTC
(In reply to Laurence Rault from comment #199)
> I have forgotten : 
> html files are exported in ISO-8859 encoding, ot utf8, some diacritics are
> not well encoded in the file, example éèàêë

So I need to change how is export ?