commit 67158768e5393b7243d66bce3228589232ada950 Author: Martin Renvoize Date: Thu Mar 26 11:11:20 2026 +0100 Bug 35380: DBRev 25.12.00.037 Signed-off-by: Martin Renvoize commit 6aff5f361a11e029a635f8a5c26def3d3149458d Author: Martin Renvoize Date: Wed Mar 25 10:12:39 2026 +0100 Bug 35380: (QA follow-up) Minor code quality fixes - Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl so filter dropdown options are consistently sorted - Add COMMENT to record_sources.is_system column in kohastructure.sql to match convention of other columns in that table - Remove commented-out Data::Dumper debug lines from biblios.t - Remove redundant explicit object deletes inside subtests that are already wrapped in txn_rollback; the rollback undoes them anyway Signed-off-by: Martin Renvoize commit 38c76968668e6f7dc3e1e3d01cf8a7b26002e3f0 Author: Martin Renvoize Date: Wed Mar 25 10:11:28 2026 +0100 Bug 35380: (QA follow-up) Fix data migration for pre-existing record sources INSERT IGNORE silently skips rows whose name already exists, leaving their is_system column at 0. Systems that already had 'intranet', 'z3950' etc. as record sources would not have them protected from deletion. Added an explicit UPDATE after the INSERT to ensure all known system record source names have is_system=1 regardless of whether the row was just inserted or already existed. Signed-off-by: Martin Renvoize commit 75d88eb36c130b3ba64259ab04e58389828b1cda Author: Martin Renvoize Date: Wed Mar 25 10:10:58 2026 +0100 Bug 35380: (QA follow-up) Fix bulkmarkimport typo in marc-overlay-rules.tt The CASE checks for 'bulkmarkimport' but the record source inserted by the atomicupdate is named 'bulkmarcimport'. The mismatch caused the display label and the JS filter option to fall through to the default (untranslated) case. Fixed in both the rule filter display block and the module_filter_options JS object. Signed-off-by: Martin Renvoize commit 9b7824d789a918924e7c2a112b0bb4c6e88b3bcb Author: Jan Kissig Date: Mon Mar 16 11:15:13 2026 +0000 Bug 35380: (follow-up): Fix errors from qa script Make atomicupdate script executable, add html filters to tt, annotate is_system as boolean (SQL12 coding guidelines) Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit 448eb4f69af55aaae9b3cf65f3a7fb44f239e48a Author: Jan Kissig Date: Fri Mar 13 10:36:14 2026 +0000 Bug 35380: Unit tests updateBiblio API: - tests for locked records (records with a given record_source which is set to can_be_edited = 0) - tests for MARCOverlayRules bound to a record_source or fallback source (*) As record_sources now has an is_system property which prevents it from getting deleted, all tests creating and deleting a record_source were changed so that is_system is set to 0 on creation. Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit ce42c3b5eca8d0289cb6bc3e7922ef935725766f Author: Jan Kissig Date: Fri Mar 13 10:18:29 2026 +0000 Bug 35380: Make updateBiblio-API respect Record overlay rules This patch moves hardcoded source filter from 'MARC overlay rules' (batchmod, intranet, z3950, staged import, bulk import, import_lexile) to 'Record Sources' and makes them untouchable. They cannot be renamed or modified. New record sources can be added and modified though. All default and newly created record sources are available as filter for the module "Source" in 'MARC overlay rules'. The API route for PUT /biblios/:biblio_id now checks for a given header x-record-source-id. If an id is given the name of the rule is retrieved and forwarded as an overlay_context to ModBiblio. If no id is given the fallback '*' is added as overlay_context. Also the record source id is getting saved. Test plan: pre) run perl installer/data/mysql/updatedatabase.pl to add new is_system column pre) run dbic to build Koha::Schema::Result::RecordSource as it gets a new columns is_system pre) run 'redocly bundle --ext json api/v1/swagger/swagger.yaml --output api/v1/swagger/swagger_bundle.json' or 'yarn build' a) enable system preference MARCOverlayRules and RESTBasicAuth b) create new record source in /cgi-bin/koha/admin/record_sources and recognize its and c) create overlay rules in /cgi-bin/koha/admin/marc-overlay-rules.pl f.e. +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | +----+-----+--------+----------+-----------+ This will make the 245 field protected from change, unless the record source matches d) go to /cgi-bin/koha/catalogue/detail.pl?biblionumber=262 and change 245 (title) via edit -> edit record e) save and take a look the title is still the same f) run the updateBiblio-Request from below with a API-testing client like REST Client g) check that title gets overwritten even though it is protected. This is due the fact the updateBiblio is not setting an overlay context. h) apply patch redo d) and e) i) add another overlay rule allowing your record source to change 245: +----+-----+--------+----------+-----------+ | id | tag | module | filter | preset | +----+-----+--------+----------+-----------+ | 1 | 245 | source | * | protect | | 2 | 245 | source | | overwrite | +----+-----+--------+----------+-----------+ j) run the updateBiblio-Request from below, be sure to fill out x-record-source-id:with your ID from step b) k) check that title gets overwritten l) run the updateBiblio-Request from below, but omit x-record-source-id or set it to another value than m) check that title is not overwritten PUT http://main-intra.localhost/api/v1/biblios/262 Authorization: Basic koha:koha Authorization: Basic koha:koha Content-Type: application/marcxml+xml x-record-source-id: 01075cam a2200313 a 4500 foo 20200421093825.0 120417s2012 ch a b 001 0 eng 482 Christiansen, Tom. 482 New Title Tom Christiansen, Brian D. Foy & Larry Wall. City Pages and more BKS Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit 246f299df1ecbc41bdf15dffc01dac25a62fec2b Author: Jan Kissig Date: Fri Mar 13 10:17:26 2026 +0000 Bug 35380: Make record sources available in overlay rules This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted. Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit d7dd72b1a44b7a69891229197678c29e412b3089 Author: Jan Kissig Date: Fri Mar 13 10:16:37 2026 +0000 Bug 35380: Schema Update Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit 86443b84373ab466a02043df00e3ce0239134d32 Author: Jan Kissig Date: Fri Mar 13 10:13:48 2026 +0000 Bug 35380: Change record sources to by systemdefined This changes the structure of record source with an is_system column which controls whether this value can be deleted. Also predefined values are inserted to reflect the default hard coded values from 'Record overlay rules' sources Signed-off-by: David Nind Signed-off-by: Martin Renvoize commit 67adbce6562fa352b143977747fa290f23c63fde Author: Martin Renvoize Date: Thu Mar 26 09:35:48 2026 +0100 Bug 42010: (RM follow-up) Tidy that was missed during push commit b0df04264e857d1993f8af2d7c64e8b01f17ce0d Author: Martin Renvoize Date: Thu Mar 26 09:30:23 2026 +0100 Bug 39781: (RM follow-up) Fix wrong mock_userenv key in test mock_userenv expects 'branchcode' but the test was passing 'branch', causing the branchcode to fall through to the 'Branch4T' default and the branch-specific notice lookup to never match. Signed-off-by: Martin Renvoize commit eb36400a9b165f2b3c8710cd3e3b4b74cb63e782 Author: Martin Renvoize Date: Thu Mar 26 09:19:07 2026 +0100 Bug 40136: (follow-up) Stringify DateTime objects in _unblessed_for_log Koha::Object::AUTOLOAD calls set_column directly, bypassing DBIC's inflate/deflate mechanism. This means date/datetime column values set via Koha object accessors (without store()) can end up as raw DateTime objects in _column_data. When _unblessed_for_log then calls get_column, it retrieves the DateTime object, which encode_json in C4::Log cannot serialise, causing the patron delete (and test) to die with an "encountered object" error. Fix by stringifying any DateTime objects found in the column data before returning from _unblessed_for_log. Signed-off-by: Martin Renvoize commit 9e8eceb1a7e5f94d7be3a878fff7f0c5b1b6deb7 Author: Tomás Cohen Arazi Date: Wed Mar 25 13:45:56 2026 +0100 Bug 23415: (follow-up) Fallback to 'days' in 'get_chargeable_units' Signed-off-by: Tomás Cohen Arazi Sponsored-by: OpenFifth commit c4c21afa6cb466cca39f42728e05ef4753e534af Author: Tomás Cohen Arazi Date: Wed Mar 25 12:22:08 2026 +0100 Bug 40136: (follow-up) Fix IsItemIssued.t mock_userenv mock_userenv was called before the test patron was created and used the default borrowernumber (51), which doesn't necessarily exist in the test database. This caused safe_to_delete to crash on the not_same_branch check when Koha::Patrons->find returned undef. Move mock_userenv after patron creation and pass the actual borrowernumber. Signed-off-by: Tomás Cohen Arazi commit 5dc1d9ba5eef27bee647299d66e44ae1d375b5b6 Author: Tomás Cohen Arazi Date: Wed Mar 25 11:16:31 2026 +0100 Bug 40136: (follow-up) Fix wrong `_result_source` call Signed-off-by: Tomás Cohen Arazi Signed-off-by: Martin Renvoize commit 062d24f1011acbb4898ea39962e7ab01ac685f73 Author: Martin Renvoize Date: Wed Mar 25 09:44:33 2026 +0100 Bug 40136: (follow-up) Avoid DateTime inflation in _unblessed_for_log Switch from unblessed() to get_column() so that date/datetime column values are returned as raw ISO strings directly from DBIC's internal storage, without constructing DateTime objects that would only be immediately stringified. This makes _unblessed_for_log cheaper on every call, which is particularly noticeable in the test suite where BorrowersLog defaults to enabled and patron stores are frequent. Signed-off-by: Martin Renvoize commit 89aa40cc1ea3d2fa9b1beb2cc04a87e2d1289e1a Author: Jonathan Druart Date: Tue Mar 24 17:07:30 2026 +0100 Bug 41460: Fix ALTER TABLE statement Signed-off-by: Jonathan Druart commit 852a8b802f168438928573750627babcb43ab7de Author: Martin Renvoize Date: Tue Mar 24 16:10:01 2026 +0100 Bug 40853: (RM follow-up) Fix re-base error commit caae75e80507d717cc8252bafe6844e51f1693bb Author: Martin Renvoize Date: Tue Mar 24 15:39:09 2026 +0100 Bug 40853: DBRev 25.12.00.036 Signed-off-by: Martin Renvoize commit 02fa01e146637fea697c447915affac534188805 Author: Nick Clemens Date: Fri Oct 3 19:22:06 2025 +0000 Bug 40853: Add ElasticsearchBoostFieldMatchAmount system preference This adds a new system preference to control the amount of boost. The default of 0 will act as before this patch. You can add any positive number, or a number between 0 and 1 for negative boost To test: 1 - Add a record with 245 $a novel 2 - Add a record with 245 $a A novel : $b about things / $c by me 3 - Search for: novel 4 - Search for: a novel 5 - Apply patch, restart all 6 - Repeat searches, note exact titles are boosted 7 - Test with more titles as you are able Signed-off-by: Jason Robb Signed-off-by: Thomas Klausner Signed-off-by: Martin Renvoize commit 06fa7499606b5bb51ad98e169929ee70e701ec7f Author: Nick Clemens Date: Fri Oct 3 19:35:43 2025 +0000 Bug 40853: Unit tests Signed-off-by: Jason Robb Signed-off-by: Thomas Klausner Signed-off-by: Martin Renvoize commit b18fbab8061ff97a7ae087ab89f2888a9223e5f5 Author: Martin Renvoize Date: Tue Mar 24 09:46:03 2026 +0100 Bug 39781: (QA follow-up) Fix crashes, dead code and add tests - Fix potential crash when C4::Context->userenv returns undef: use the established ternary guard pattern used throughout other TT plugins (AuthorisedValues, Branches, Desks, etc.) - Remove dead second argument passed to GetLettersAvailableForALibrary, which only accepts one argument; the group_by/columns/order_by hashref was silently dropped - Fix typo "librries" -> "libraries" in GetByModuleForLibrary POD - Update POD example to use 'add_message' module matching actual usage - Add test coverage for GetByModuleForLibrary, verifying that a user logged in to a branch sees branch-specific and all-libraries notices, while users at other branches see only all-libraries notices Signed-off-by: Martin Renvoize commit 5937d40a280a739bd07baeda0b5f5c02bc184b32 Author: Andrew Fuerste-Henry Date: Mon Mar 16 13:35:40 2026 +0000 Bug 39781: Add POD coverage Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize commit 3a1bd59197a207d49bb1a2e30ce4349352b70ef2 Author: Andrew Fuerste-Henry Date: Sat Mar 14 18:25:16 2026 +0000 Bug 39781: Allow limiting of custom message notices by library To test The following should work with either email or SMS notices sent from the Add Message button in a patron record 1 - create a notice in module Patrons (custom message) for all libraries 2 - create a notice in module Patrons (custom message) for Centerville 3 - while logged in at Centerville, confirm you can see and enqueue your all libraries message 4 - while logged in at Centerville, confirm you can see but cannot successfully enqueue your Centerville message 5 - while logged in at Fairfield, confirm you can see but cannot successfully enqueue your Centerville message 6 - apply patch, restart_all 7 - while logged in at Fairfield, confirm you can see and enqueue your all libraries message 8 - while logged in at Fairfield, confirm you cannot see your Centerville message 9 - while logged in at Centervielle, confirm you can see and enqueue your Centerville message Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize commit ea5936b15a7a371846823cfa9b52bf913903f8a4 Author: Martin Renvoize Date: Tue Mar 24 15:36:52 2026 +0100 Bug 42083: DBRev 25.12.00.035 Signed-off-by: Martin Renvoize commit 8eec766b5a2713c25b950d55b82ecbc8cfe1e37b Author: Martin Renvoize Date: Tue Mar 24 09:19:43 2026 +0100 Bug 42083: (QA follow-up) Simplify atomicupdate migration loop Replace the O(n²) accumulate-and-re-insert pattern with a simple per-row execute inside the while loop. Signed-off-by: Martin Renvoize commit 3dd4691076d822ef44b0aae0a86329aac5a6a3da Author: Andrew Fuerste-Henry Date: Thu Mar 12 23:00:27 2026 +0000 Bug 42083: Implement distinct permissions To test: 1 - have an staff account with 'send_messages_to_borrowers' permission but not top level 'borrowers' permission 2 - have a value in SMSSendDriver system preference 3 - log in under your staff account and confirm you can send both email and SMS messages from the Add Message button on a patron record 4 - apply patch, updatedatabase, restart_all 5 - confirm your staff account now has 'send_messages_to_borrowers_email' permission rather than 'send_messages_to_borrowers' 6 - confirm your staff account can now only send email messages from the Add Message button on a patron record 7 - add 'send_messages_to_borrowers_sms' permission to your staff account 8 - confirm your staff account can now send both email and sms messages from the Add Message button on a patron record 9 - remove 'send_messages_to_borrowers_email' from your staff account 10 - confirm your staff account can now only send sms messages from the Add Message button on a patron record Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize commit 6b51873f9c5e8d8cc988a3ff46b8b008bf8dc15d Author: Andrew Fuerste-Henry Date: Thu Mar 12 21:54:09 2026 +0000 Bug 42083: atomicupdate for permissions Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize commit 153a18d6038fbd9005e9421460f52899547b8c9c Author: Andrew Fuerste-Henry Date: Thu Mar 12 20:02:07 2026 +0000 Bug 42083: Create distinct permissions Signed-off-by: Juliet Heltibridle Signed-off-by: Martin Renvoize commit 9d39d80801389c1446cb470a37ab70ec21552dee Author: Martin Renvoize Date: Fri Mar 6 10:28:47 2026 +0000 Bug 42010: Escape EDIFACT special characters in BGM purchase order number Bug 20253 introduced the ability to use the basket name as a purchase order number in the BGM segment of an EDIFACT order message. However, the basket name was inserted into the BGM segment without escaping EDIFACT special characters (apostrophe, colon, plus, question mark). In EDIFACT, the apostrophe (') is the segment terminator, so any literal apostrophe in data must be escaped with the release character (?) as ?'. Without this, a basket name like "Children's Requests" would produce an invalid EDIFACT message. This fix applies encode_text() to the purchase order number in beginning_of_message() so all special characters are properly escaped. Test plan: - Run t/db_dependent/Koha/Edifact/Order.t - All tests should pass, including the new tests covering special character escaping in BGM segments Signed-off-by: Graham Jones Signed-off-by: Martin Renvoize commit 0d84b49ea7fb91171f1c2e07abd94bb54007ae86 Author: Nick Clemens Date: Tue Mar 24 08:57:30 2026 +0000 Bug 41959: (QA follow-up) Add missing POD Signed-off-by: Martin Renvoize commit 6fbcedd5db9713c856c4ba5658c400fa35ad366f Author: Andreas Jonsson Date: Fri Mar 6 20:21:50 2026 +0000 Bug 41959: Handle edge case Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize commit 890ce7cc49dcf071d7cd58936e975cf7995c07aa Author: Nick Clemens Date: Thu Mar 5 20:32:46 2026 +0000 Bug 41959: Unit tests This adds a test for the condition where there are 2 holds, 1 item, and the item cannot fulfill the first hold Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize commit 97d980a7ba358b4a06255cec58b655d296fe14f0 Author: Martin Renvoize Date: Tue Mar 24 15:34:12 2026 +0100 Bug 41460: DBRev 25.12.00.034 Signed-off-by: Martin Renvoize commit 7cebccb76f3927d6be4d80fc1079e6b65c577461 Author: Michael Hafen Date: Tue Dec 16 11:40:30 2025 -0700 Bug 41460: Remove default value from mediumtext column systempreferences.value Mysql doesn't allow text type columns to have a default. Signed-off-by: Martin Renvoize commit 1544020e57bcad18afa1ef3175d96d41e70531dd Author: Martin Renvoize Date: Tue Mar 24 12:19:31 2026 +0100 Revert "Bug 41247: Add cypress tests" This reverts commit e838b70be7cccdabd41b19469f422c73cb067151. commit 8d14dbe0f149a0882dbe0cc48558df8d0734eb23 Author: Martin Renvoize Date: Tue Mar 24 12:19:06 2026 +0100 Revert "Bug 41247: (follow-up) Fix Cypress test after administration rename" This reverts commit b7eea37e1abaa2447f79a2685c179db208f23ac1. commit aa895e95c5e1d4e12f368faed7b27506c5ea57c9 Author: Martin Renvoize Date: Tue Mar 24 12:17:58 2026 +0100 Revert "Bug 41247: Preparation: Cypress XML plugin" This reverts commit 0387ebfb97c11bd31776f9bdd79737c5fa287ded. commit 7077634044182d8bcfea24fccd4565980b2fbc8b Author: Martin Renvoize Date: Tue Mar 24 12:17:41 2026 +0100 Revert "Bug 41247: Improve ILL batches modal resetability" This reverts commit b591b668d29611fe6b9ece85cd7ec3e4293cae62. commit a12aac8957efad724ab5a30f3d221567b460967c Author: Jonathan Druart Date: Fri Jan 23 10:35:53 2026 +0100 Bug 41521: Silent perlcritic warnings Stricture disabled at line 67, column 5. See page 429 of PBP. (Severity: 5) We should deal with that later instead of ignoring the warnings Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit d0ee8f5a6e9cb4bebb209c05e938c8111273cdb2 Author: Jonathan Druart Date: Fri Jan 23 10:31:32 2026 +0100 Bug 41521: Fix forbidden patterns (trailing spaces and http) Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit 8c46e76045046d66e10a18a340728c84e4bb1cca Author: Jonathan Druart Date: Fri Jan 23 10:28:27 2026 +0100 Bug 41521: Fix spelling Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit bbf43f465e6b4e7f2cf555ad3eecf830d9f1a0f0 Author: Jonathan Druart Date: Fri Jan 23 10:22:23 2026 +0100 Bug 41521: Exclude lib/WebService from pod xt tests Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit f9788889f3866f687f0049d37133e5ad92e7dec8 Author: Jonathan Druart Date: Fri Jan 23 10:06:23 2026 +0100 Bug 41521: Remove deps from cpanfile Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit b7b85b3eebfe101dd25db822a3689c419dc2226c Author: Jonathan Druart Date: Fri Jan 23 09:55:06 2026 +0100 Bug 41521: Reject lib/ from tidy check Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit b4b62d082073d8a312b25b78c37906ad05a6f87d Author: Jonathan Druart Date: Fri Jan 23 09:32:16 2026 +0100 Bug 41521: Remove perl valid warnings % perl -wc Koha/ExternalContent/OverDrive.pm Possible precedence issue with control flow operator (die) at /kohadevbox/koha/lib/WebService/ILS/OverDrive/Patron.pm line 365. Possible precedence issue with control flow operator (die) at /kohadevbox/koha/lib/WebService/ILS/OverDrive/Patron.pm line 573. Possible precedence issue with control flow operator (die) at /kohadevbox/koha/lib/WebService/ILS/OverDrive/Patron.pm line 643. Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit 5d516102c82feb4b5100acc05803b412e30c337f Author: Jonathan Druart Date: Fri Jan 23 09:29:51 2026 +0100 Bug 41521: Add WebService::ILS to lib/ Signed-off-by: Victor Grousset/tuxayo Signed-off-by: David Cook Signed-off-by: Martin Renvoize commit 63a1924b271584c25b4a120c0318a5ca79c9f6d5 Author: Hammat Wele Date: Thu Nov 13 13:23:55 2025 +0000 Bug 33857: Avoid increasing file size while uploading image This patch prevents image size from increasing while uploading by keeping the original image format Test plan: 1. Download the attached image large-image.jpg --> It should be ~170kB and 1000×1500 pixels 2. Enable LocalCoverImages in System preferences 3. Find a record in the staff interface 4. Go to "Images" tab 5. Upload large-image.jpg image 5.1. Click on "Upload" 5.2. Click on "Drop files here or click to select a file" 5.3. Choose picture (large-image.jpg) 5.4. Click on "Process images" 6. Click on image for large image 7. Right-click on the image and save it --> It is ~930kB and 600x900 pixels 8. Apply the patch and flush browser cache (Crtl+F5) to update js files 9. Detele the previous uploaded image 10. Repeat step 3, 4, 5, 6, 7 --> The image is ~92kB and 600x900 pixels 11. prove t/db_dependent/Koha/CoverImages.t --> All tests should be successful Signed-off-by: Owen Leonard Signed-off-by: Kyle M Hall Signed-off-by: Martin Renvoize commit 699ba06eb70d3488fba0ba47f406ffe4fe96f4f9 Author: Emily Lamancusa Date: Mon Mar 23 13:22:04 2026 -0400 Bug 41386: (QA follow-up) Make sure charge is defined Check that $charge is defined before comparing, to avoid "argument isn't numeric" error if no charge is defined. Signed-off-by: Emily Lamancusa Signed-off-by: Martin Renvoize