commit 80f504edd9b654cc31a0fbdc5e050a0309a37cf6 Author: Jonathan Druart Date: Fri Sep 18 09:07:38 2026 +0200 Bug 42094: Fix new occurrences in reserve/request.tt Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 081dd7df12dcc520011b33e7427842d43bec0aaf Author: Jonathan Druart Date: Tue Sep 15 21:35:13 2026 +0200 Bug 42094: Fix new occurrences in patron_import.inc Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 81955fc2db423098ab9e2b9cf45937f8d7ee220d Author: Jonathan Druart Date: Fri Sep 11 14:39:38 2026 +0200 Bug 42094: (follow-up) Fix occurrence in t Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 4c7698ee0a9260b741e11d68897054831230d7b8 Author: Owen Leonard Date: Fri Sep 11 08:06:27 2026 -0400 Bug 42094: (follow-up) Move a stray TT block Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 23cf116748f929f1e5c1b91b14260cb66c376ace Author: Owen Leonard Date: Fri Sep 11 07:23:51 2026 -0400 Bug 42094: (follow-up) Add missing END Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit c9162781830bdbcf9b0dedb187075c1891794c6c Author: Jonathan Druart Date: Fri Sep 11 09:45:05 2026 +0200 Bug 42094: tools/restore-records.tt Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit c2edb7049282a5ffd695ff9a364c5b3b0e4a66ef Author: Jonathan Druart Date: Fri Sep 11 09:44:43 2026 +0200 Bug 42094: pos/printreceipt.tt Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 9c5b05c0acf2e5d8dd02e9be41de1a30ef397e5f Author: Jonathan Druart Date: Fri Sep 11 09:44:31 2026 +0200 Bug 42094: members/moremember.tt Review this with `git show -w` to remove the indentation changes Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 49f598d1a22129c8b7800e3e6213fae3f41e847d Author: Jonathan Druart Date: Fri Sep 11 09:44:21 2026 +0200 Bug 42094: ill/ill.tt Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 0a2d83efc84b3f124361dc25df2fd1014fb08d82 Author: Jonathan Druart Date: Fri Sep 11 09:44:11 2026 +0200 Bug 42094: circ/transferstoreceive.tt Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 7a453e0f5dfa20f1309b25ef462cd09504ee0a4d Author: Jonathan Druart Date: Fri Sep 11 09:44:02 2026 +0200 Bug 42094: admin/circulation_triggers.tt Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 5570719a71af70fb22b11695642b455c59dd33dd Author: Jonathan Druart Date: Fri Sep 11 09:43:42 2026 +0200 Bug 42094: patron-detail-tabs.inc Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 1e0f343c3b4e73818f89a0ac6e89e307a300939e Author: Jonathan Druart Date: Fri Sep 11 10:35:08 2026 +0200 Bug 42094: opac-user.tt - exception Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 836394209b14fe5d075898636fd283b1ce477947 Author: Jonathan Druart Date: Fri Sep 11 09:43:53 2026 +0200 Bug 42094: wrapper-staff-tool-plugin.inc - exception Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 7bd2f5e3cb98573a503aebf566134bf6900f94d7 Author: Jonathan Druart Date: Fri Sep 11 09:43:27 2026 +0200 Bug 42094: main-container.inc - exception Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 3a50054e25aa912e787d1288f9a3023106b73658 Author: Jonathan Druart Date: Fri Sep 11 10:20:40 2026 +0200 Bug 42094: Allow data-tt-allowed-exception="true" on module and importmap scripts Allow a second data-tt-allowed for module and importmap To identify them clearly the attribute is data-tt-allowed-exception. Ideally we should not need that but I prefer an easy solution and not break the Vue islands. Something better to suggest? Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit d81ebbd6e7d2cea67a7eb3b6cf21738838f26715 Author: Jonathan Druart Date: Thu Apr 2 09:47:26 2026 +0200 Bug 42094: Fix occurrence in t Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 73ac4daf1e7357865ad5c4e04ca3d9a820064b6c Author: Jonathan Druart Date: Thu Apr 2 09:47:14 2026 +0200 Bug 42094: Adjust tests Rename xt/tt_kohaTable_tidy.t to xt/tt_script_tidy.t We now test all .tt and .inc files, except cataloguing/value_builder files. They are very messy and not trivial to migrate. Test plan: If you have applied all patches from the dependeng bug reports this test should now pass. We are testing that: * All files has only ONE script tag with the attribute data-tt-allowed set to "true" * All script tags with data-tt-allowed="true" have TT tags * All script tags without data-tt-allowed="true" do not have TT tags Signed-off-by: Owen Leonard Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 58a671cfdd2531439cdf08d7bf0b7ecadeba3278 Author: Jan Kissig Date: Fri Oct 9 11:13:26 2026 +0000 Bug 42294: Fix error on show entries dropdown in patron search This fixes an error for the values in the show (number of) entries on the patron search datatable which is dependent on a system preference PatronsPerPage. - When set to 20 this resulted in in a String "20" and appeared to times in the dropdown menu. - When set to "" or "acb" (as the syspref is not validated yet (see 43767) led to an error. Testplan (with patch applied): - Set the system preference to the following values: "", "abc", 20, 75. - For each value go to /cgi-bin/koha/members/members-home.pl?firstletter=A and check the following - check the drop down above the table which says "Show ## entries" - "" -> dropdown is 10, 20, 50, 100, All - "abc" -> dropdown is 10, 20, 50, 100, All - 20 -> dropdown is 10, 20, 50, 100, All - 75 -> dropdown shows 10, 20, 50, 75, 100, All Signed-off-by: Pedro Amorim commit cd2e84f67e40b9f7f3c94590ba708439cdcd6647 Author: Jan Kissig Date: Fri Oct 9 07:18:32 2026 +0000 Bug 42294: Fix Uncaught TypeError This fixes the Uncaught TypeError on pages that display a patron search datatable with a callback function (select, add). The variable callback carries the function name and is now called via window[callback](...). Testplan: 1) Go to http://localhost:8081/cgi-bin/koha/suggestion/suggestion.pl?op=add_form 2) Open the browser console 3) Click 'Select manager', search for any patron and click 'Select' 4) Notice nothing happens: the modal stays open, no manager is set, and the Apply the patch and redo steps 1-4. The error should be gone and selecting a patron shall work now The same applies for - 'Set to patron' (suggester) on the same page - 'Select manager' on ILL requests - 'Add linked account' on the patron details page (needs 'EnablePatronAccountLinking') Signed-off-by: Pedro Amorim commit 45fcebc3915a142f35ed4720680a4c849e05d790 Author: Jan Kissig Date: Fri Jul 10 09:18:08 2026 +0000 Bug 42294: (follow-up) Fix initialisation of empty arrays in patron-search.inc When actions was not defined on template call (f.e. reserve/request.pl) it resolved to an empty string. This finally led to 'ARRAY(0x55c8872a7130)' interpolated in the template. This patch surrounds the brackets with single quotes so that the expression evaluates to an empty JS array. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 340df6ab214b35c17afcf08f27e9d7600f3a2212 Author: Jan Kissig Date: Thu Jul 9 09:31:09 2026 +0000 Bug 42294: (follow-up) Fix order_column_index loop count As TT loop starts with 1 and JS forEach starts with 0, the '-1' is not necessary. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 9069df23b44bdecb52fb6df7f8cdd770eff5efd7 Author: Jan Kissig Date: Thu Jul 9 07:49:49 2026 +0000 Bug 42294: (follow-up): add patron_search_url to Koha.patron_searches object As each patron search has its own search base (defined by patron_search_url) it has to be set and retrieved via the new Koha.patron_searches object This would only affect pages with two patron searches like /cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=1 Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 2d2adba262187f28e001121fde6ac2b82e6fd44d Author: Jan Kissig Date: Wed Jul 8 18:53:43 2026 +0000 Bug 42294: (follow-up): Fix singleBranchMode singleBranchMode is defined in js_includes. It is also not a system preference and therefore removed from patron-search.inc. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 8c9724c783e6adf1a1b1c1729ed428001932231a Author: Jonathan Druart Date: Tue Apr 7 12:37:07 2026 +0200 Bug 42294: Tidy all script tags - patron searches (auto tidy) Signed-off-by: Jan Kissig Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit bd699e27888247f5415fb27b37c92163cfb9542c Author: Jonathan Druart Date: Tue Apr 7 12:36:20 2026 +0200 Bug 42294: Tidy all script tags - patron searches In order to tidy all the script tags of the .tt files we isolate the interpolation of Template::Toolkit variables in a separate script tag. This patch focuses on the patron searches. Non-trivial changes! The hardest part was to make sure the 2 patron searches on the edit fund view were still working correctly (owner and users) Signed-off-by: Jan Kissig Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 284a5006f35cef448daa0771d506c79a3697f926 Author: Pedro Amorim Date: Thu Oct 1 13:28:53 2026 +0000 Bug 40901: (follow-up) Exempt systemd units test from Test::NoWarnings check The test loads Test::NoWarnings after its plan so skip_all keeps working, which xt/use-test-no-warnings.t does not recognise. Test plan: 1) prove t/00-valid-systemd-units.t xt/use-test-no-warnings.t Co-Authored-By: Claude Opus 5.5 Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 39a6f167ffbcbe87899f439961b02bb296314ee1 Author: Olivia Reynolds Date: Tue Oct 6 14:51:39 2026 +0000 Bug 43739: Disambiguate report templates by transport type As the report template dropdown offers each message transport type for a give notice, this can lead to duplicate entries with no way to tell them apart. This patch disambiguates each entry by appending the transport type. Test plan: 1. Ensure Bug 43736 is already applied. 2. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 3. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 4. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice, with no way to distinguish them. 5. Apply patch and refresh. 6. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice, each also including their transport type. 7. Verify that running each template version produces the correct corresponding output for its transport type. Sponsored-by: Open Fifth Signed-off-by: Barbara Johnson Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 21e1d5ec1193e23db0de67e2d1bf612da9edcbe1 Author: Olivia Reynolds Date: Tue Oct 6 14:49:49 2026 +0000 Bug 43736: Restore existing report template selection Bug 38621 changed report templates to be based off of the code. This meant we lost the functionality of choosing between the email and print versions of each template. This restores the previous behaviour, where all report templates were displayed and keyed by ID. Test plan: 1. Under Tools > Notices and Slips, create a new notice in the Reports module. Choose a code and a name, and add distinct subjects and contents for both Email and Print. For example, "Email: [% today %]" and "Print: [% today %]". 2. Under Reports, create a new report from SQL with a name and the following query: SELECT 1; 3. Open the "Run with template" dropdown for the report, and verify you see the name of your created notice twice. 4. Run each of the two versions of your notice, and verify they both run the Email version. 5. Apply patch and refresh. 6. Verify there are still two versions of your notice in the dropdown. 7. Verify that one version of the notice runs the Email template, and the other the Print template. 8. Verify that using the Download dropdown and selecting "Rendered template" for each version of the notice produces a downloaded file with the correct rendered contents. Sponsored-by: Open Fifth Signed-off-by: Barbara Johnson Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 598d5e97d7725cc3a9b3dca41f0093969cbc1655 Author: Pedro Amorim Date: Thu Oct 1 11:23:05 2026 +0000 Bug 43674: (follow-up) Declare ISO 18626 version 2021-3 Koha's ISO 18626 messages follow the 2021-3 schema, but the envelope declared version 1.2 and the controller POD cited the v1.2 XSD. Test plan: 1) Apply patch and restart_all 2) Enable the ILLModule system preference 3) Run: curl -s -X POST http://localhost:8081/api/v1/public/ill/iso18626 \ -H "Content-Type: application/xml" \ -d '
1
' 4) Note the response is wrapped in (the BadlyFormedMessage errors are expected, the request above is deliberately minimal) 5) prove t/db_dependent/Koha/ILL/ISO18626.t t/db_dependent/api/v1/iso18626/request.t Co-Authored-By: Claude Opus 5.5 Signed-off-by: Phan Quang Minh Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit f427429f55eb00255600cfd1606a8dc977911d8b Author: Pedro Amorim Date: Wed Sep 30 15:51:50 2026 +0000 Bug 43674: Wrap request.t test data in the ISO18626Message envelope The request, requestingAgencyMessage and mocked partner confirmation test data now use the ISO18626Message envelope, in the ISO 18626 namespace, instead of bare messages in a placeholder namespace. Test plan: 1) prove t/db_dependent/api/v1/iso18626/request.t Co-Authored-By: Claude Opus 5.5 Signed-off-by: Phan Quang Minh Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit a7ca37b4ae98f358ddab2c09735e3412b856e6eb Author: Pedro Amorim Date: Wed Sep 30 11:32:15 2026 +0000 Bug 43674: Wrap ISO 18626 messages in the ISO18626Message envelope ISO 18626 requires every message to be wrapped in an ISO18626Message element, in the ISO 18626 namespace, with a version attribute. Koha sent and expected the bare message, so schema-conformant partners rejected it. Koha now wraps outgoing messages and unwraps incoming ones. Unwrapped messages are still accepted. Test plan: 1) Apply patch and restart_all 2) Enable the ILLModule system preference 3) Run: curl -s -X POST http://localhost:8081/api/v1/public/ill/iso18626 \ -H "Content-Type: application/xml" \ -d '
1
' 4) Note the response is wrapped in (the BadlyFormedMessage errors are expected, the request above is deliberately minimal) 5) prove t/db_dependent/Koha/ILL/ISO18626.t t/db_dependent/api/v1/iso18626/request.t Co-Authored-By: Claude Opus 5.5 Signed-off-by: Phan Quang Minh Signed-off-by: Lisette Scheer Signed-off-by: Pedro Amorim commit 034db09c74bf7f49b23ce317cf08f97de46c5698 Author: Tomás Cohen Arazi Date: Fri Aug 7 12:30:09 2026 -0300 Bug 43196: Reject malformed MARC records in PUT /biblios MARC::Record parsers silently return empty records on invalid input: - new_from_mij_structure(undef) returns a blank record (MiJ) - new_from_usmarc(garbage) returns a blank record with warnings - new_from_xml(valid-but-empty) returns a blank record The PUT /biblios endpoint passed these blank records to ModBiblio, which overwrote existing bibliographic data with an empty record (only system-generated 005 and 999 fields survive). Wrap each parser call in try/catch (for MARCXML which dies on malformed XML) and validate the resulting record has at least one field before proceeding. Return 400 if parsing fails or produces an empty record. Note: MARC::Record::MiJ upstream has been patched to croak on undef/invalid input (perl4lib/marc-perl#28), but Koha needs this defensive check regardless for USMARC and empty-but-valid cases. Test plan: 1. Apply the regression tests from the previous commit 2. Run: $ prove t/db_dependent/api/v1/biblios.t => FAIL: put() malformed body tests fail 3. Apply this patch 4. Repeat step 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomás Cohen Arazi Signed-off-by: David Nind Signed-off-by: Emily Lamancusa Signed-off-by: Pedro Amorim commit 32b830799c0af4956583b7abb2e4f4352b9077f7 Author: Tomás Cohen Arazi Date: Fri Aug 7 11:38:35 2026 -0300 Bug 43196: Regression tests for PUT /biblios with malformed bodies MARC::Record::new_from_mij_structure silently returns an empty record when passed undef or an invalid structure. The PUT /biblios endpoint does not validate the parsed record before calling ModBiblio, resulting in a 200 response for clearly invalid input. This patch adds regression tests for all three supported content types: - application/marc-in-json: truncated JSON, invalid structure, empty fields - application/marcxml+xml: truncated XML, empty record - application/marc: garbage input All should return 400 but currently return 200. Note: MARC::Record::MiJ upstream should arguably croak on undef/invalid input rather than returning a blank record. Test plan: 1. Apply patch 2. Run: $ prove t/db_dependent/api/v1/biblios.t => FAIL: put() malformed body tests fail (200 instead of 400) 3. Sign off :-D Signed-off-by: Tomás Cohen Arazi Signed-off-by: David Nind Signed-off-by: Emily Lamancusa Signed-off-by: Pedro Amorim commit 11d6ce122dec0930302ac29aa219ad180213c304 Author: Thibaud Guillot Date: Thu Sep 24 16:20:27 2026 +0200 Bug 32542: (QA follow-up) Use constants for cover image wait timeout and tidy files Signed-off-by: Baptiste Wojtkowski Signed-off-by: Pedro Amorim commit 1cd449dcca5c5bd8e2ba1c6cde5a925c32ec736c Author: Tadeusz „tadzik” Sośnierz Date: Mon May 11 15:33:18 2026 +0200 Bug 32542: Await all image loads before setting coce.done Signed-off-by: Jan Kissig Signed-off-by: Baptiste Wojtkowski Signed-off-by: Pedro Amorim commit 811ead8d5f290ab555c0edb4a37029afcb30a87b Author: Nick Clemens Date: Tue Sep 23 19:02:03 2025 +0000 Bug 32542: Add 'wait_for_images' to results.js' Signed-off-by: Jan Kissig Signed-off-by: Baptiste Wojtkowski Signed-off-by: Pedro Amorim commit f4eb7647456131d32b844ad0bf4cf268afdf29e8 Author: Pedro Amorim Date: Fri Sep 25 11:18:39 2026 +0000 Bug 42810: [ALTERNATIVE] Show self-renewal information message field on new categories Pass [""] instead of [] for new categories so one empty field is rendered. Test plan (before applying this patch): 1. Go to Administration > Patron categories > New category: http://localhost:8081/cgi-bin/koha/admin/categories.pl?op=add_form 2. Scroll to 'Account expiry and self-renewal'. Note there is no 'Self-renewal information message' field 3. Apply patch, restart plack 4. Repeat 1 and 2. Confirm the field is now shown 5. Click 'New' once, fill in both messages and the other required fields, save 6. Edit the new category. Confirm both messages are shown Co-Authored-By: Claude Opus 5.5 Signed-off-by: Owen Leonard Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim commit 5cffaf3cdf2cc88ce38884b3fc2ad7b93a7e5271 Author: Matt Blenkinsop Date: Mon Aug 24 10:02:23 2026 +0100 Bug 43361: Prevent subscription orders from being included in invoice item counts Test plan: 1. Go to /cgi-bin/koha/acquisition/vendors/1. Click "New" → "Basket", name it, "Save". 2. "Add to basket" → "From a new (empty) record". Fill Title, Quantity=1, Fund, Vendor price=100, "Save". 3. Click "Close basket", confirm. 4. "My Vendor" breadcrumb → "Receive shipments" → type any "Vendor invoice" name → "Next". 5. Click "Receive" on the order row. Set Quantity received=1, check "Receive?", confirm Actual cost ≠ 0, "Confirm" → "Finish receiving". 6. "My Vendor" → "Receive shipments" again. Note the Item count and Items expeected for your invoice. 7. On that same pending-orders page, click the invoice (should lead you to /cgi-bin/koha/acqui/parcel.pl?invoiceid=1), then click the order's title link directly (under 'Summary' column). Click "New" → "New subscription", fill required fields, "Next", "Save subscription". Repeat once more on that exact record. 8. Reload "Receive shipments": Item count and Items expected for the same invoice are now doubled. 9. Apply patch and restart_all 10. Refresh the page, the invoice counts should now be correct Signed-off-by: John Vinke Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 66d6ca0c23685af81ae7bc6e8eb6545f3bee166f Author: Pedro Amorim Date: Thu Oct 8 09:59:33 2026 +0000 Bug 40294: DBRev 26.06.00.032 Signed-off-by: Pedro Amorim commit 9f0b0bc8b7721ba40672032a7ba9ba8038f9e3a8 Author: Jan Kissig Date: Tue Oct 6 13:41:58 2026 +0000 Bug 40294: (QA follow-up) Fix failing test patrons_self_renewal.t This fixes the randomly failing test patrons_self_renewal.t when a patron is doing a self renewal via API. The called module SelfRenawal creates a letter with - letter_code = "MEMBERSHIP_RENEWED" - is_notice_mandatory = $is_notice_mandatory, - forceprint => 1 The param forceprint will always create a MEMBERSHIP_RENEWED letter with transport 'print'. The param is_notice_mandatory dependends on the patron categories setting enforce_expiry_notice which, if enabled, would trigger the message fallback chain enabled by this bug. This could lead to variable number of messages being generated and made the test fail. Therefore enforce_expiry_notice is disabled for the patron category used in the mentioned test. To test: prove t/db_dependent/api/v1/patrons_self_renewal.t Signed-off-by: Pedro Amorim commit bdba0b95f0d514f3c59abd65fc8c213e2ee41735 Author: Jan Kissig Date: Tue Sep 29 18:01:15 2026 +0000 Bug 40294: (QA follow-up) Fix atomicupdate This removes the literal '\n' in atomicupdate for MEMBERSHIP_RENEWED print notice and changes the output to MEMBERSHIP_RENEWED instead of MEMBERSHIP_RENEWAL. Signed-off-by: Pedro Amorim commit 54abe0af7cc06ae47894ae03e39a9fd12c825df4 Author: Jan Kissig Date: Tue Sep 29 17:47:10 2026 +0000 Bug 40294: (QA follow-up) Fix tests Introduce check for existing notice templates to prevent db constraint. Fix wording to match actual message template. Signed-off-by: Pedro Amorim commit 91001fc6435b883964169fe6f959b87eba7264a9 Author: Jan Kissig Date: Tue Sep 1 06:59:41 2026 +0000 Bug 40294: (QA follow-up): Fix is_notice_mandatory in membership_expiry.pl The flag is_notice_mandatory was determined using grep with the patrons category code against a list of patron categories which have enforce_expiry_notice set to YES. As grep expects the first param to be a regular expression but was given a simple string (f.e. 'S') it returned the count of patron categories which have enforce_expiry_notice set to YES. So when one patron category had a mandatory expiry notice set, all messages where flagged as mandatory. This patch wraps the category code in a regular expression so that grep will only return the number of exact matches. Signed-off-by: Pedro Amorim commit c2398b9b3fcdb830752cff0cdac69e226230e1a1 Author: Emily Lamancusa Date: Tue Jun 30 17:02:59 2026 -0400 Bug 40294: Update tests To test: prove t/db_dependent/Koha/Patrons.t Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim commit 878ee22bd022cb3ea8fef011e42bc8acdfe5b3e1 Author: Emily Lamancusa Date: Mon Jul 20 12:45:37 2026 -0400 Bug 40294: Add default print notices for existing installations If an existing installation doesn't already have print notice templates defined for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, add default notice templates to the database. To test: 1. Start a fresh test environment without the patch applied 2. Apply patch and updatedatabase --> Database update should say that print notice templates for MEMBERSHIP_EXPIRY and MEMBERSHIP_RENEWAL were added 3. In the staff interface, go to Tools > Notices and Slips 4. Search for MEMBERSHIP_EXPIRY and click to Edit button 5. Expand Print section --> Confirm the default text has been filled in 6. Make some changes to the Print section and save 7. Repeat steps 4-6 for MEMBERSHIP_RENEWAL 8. updatedatabase again --> Database update should say the print notice templates are already defined and no changes are needed 9. Repeat steps 3-5 for MEMBERSHIP_EXPIRY --> Confirm that the changes you made earlier are still there 10. Repeat steps 3-5 for MEMBERSHIP_RENEWAL --> Confirm that the changes you made earlier are still there Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim commit 331d85e1ab208eb21e00e676edf08248cf7873cb Author: Emily Lamancusa Date: Tue Jun 30 13:21:01 2026 -0400 Bug 40294: Improve descriptions and add default print notice templates Fix the description for enforce_expiry_date in the API spec Add a hint to the account category administration page about making sure all relevant membership expiration notice templates are defined. Add sample Print notice templates for MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY, to ensure those notices will not be missed if the cron job falls back to print notices. Note that these sample notices will only be added for new installs. Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim commit a98bae5f43a51122d9a9a54c9ae60409cddc8b53 Author: Emily Lamancusa Date: Tue Jun 30 11:09:58 2026 -0400 Bug 40294: Enforce mandatory expiry messages in message queue Enforce that mandatory patron expiry messages will be queued even if the patron does not have a message transport selected (e.g. if expiry notices became mandatory for a patron due to category change or settings change, and their messaging preferences have not been updated yet) If the patron does have at least one transport selected for expiry notices, their selection will be honored. If not, a fallback will be selected depending on which message transports are enabled and what contact information is defined in the patron account. In order of preference, the following transport methods will be considered: 1. email 2. phone 3. sms 4. print To test: 1. Set patron account expiry messages to mandatory for a patron category i. Go to Administration > Patron Categories ii. Click an existing patron category to edit it iii. Under the section, "Account expiry and self-renewal", set "Enforce patron account expiry notice" to Yes iv. Click Save 2. Set the following system preferences: i. Set SMSSendDriver to Email ii. Set PhoneNotification to Enable iii. Set MembershipExpiryDaysNotice to 1 3. Define notice templates for all transport methods of MEMBERSHIP_RENEWED and MEMBERSHIP_EXPIRY i. Go to Tools > Notices and Slips ii. Edit the MEMBERSHIP_RENEWED notice iii. Expand the Phone, Print, and SMS sections iv. Fill in a Message Subject and a Message Body for each tab v. Save the notice template vi. Repeat iii-v for MEMBERSHIP_EXPIRY notice 4. Find or create a patron using the patron category from step 1 5. Edit the patron account and set Expiry date to tomorrow's date 6. Edit the patron's messaging preferences, if necessary, to ensure that nothing is selected for "Patron account expiry" 7. Edit the patron and add the following contact information: i. email address ii. phone number iii. smsalertnumber 8. Run the membership expiry cron job i. ktd --shell ii. perl misc/cronjobs/membership_expiry.pl -v -c 9. Open the patron's Notices tab --> An email notice should have been queued 10. Edit the patron's messaging preferences and text various settings for the "Patron account expiry" preference and re-run the cron job as in step 6 --> New notices should be queued according to the preference settings 11. Edit the patron's messaging preferences to remove all selections for "Patron account expiry" 12. Edit the patron account and delete all email addresses 13. Run the cron again --> a phone notice should have been queued 14. Repeat with various combinations of system preference settings and contact information values in the patron account --> Ensure that the cron always queues a notice, and does not queue any notices that do not make sense based on system preferences and patron account information Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim commit c817390b5cf3e560c73fc0331de063850bbaf997 Author: Emily Lamancusa Date: Tue Jun 30 10:24:52 2026 -0400 Bug 40294: Show transport preference for mandatory expiry notice Restore the ability to edit the patron messaging preferences for the patron expiration notice when the notice is mandatory. If the patron expiration notice is mandatory for that patron category, it will be labeled as mandatory. Validation to enforce that at least one transport method is actually selected will be added in a follow-up. Signed-off-by: David Nind Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim commit 92b02b5cef12649ad3843c6e6a61d816ebde54f2 Author: Jonathan Druart Date: Wed Oct 7 07:41:50 2026 +0200 Bug 42295: Fix manager link Previous patch broke the manager link, it mixed backtick and quote Signed-off-by: Pedro Amorim