commit 1b408f7bb20c1d6d77f8ef02c3dfe050c96f4697 Author: Nick Clemens Date: Fri Sep 18 12:49:12 2026 +0000 Bug 36549: (QA follow-up) Restore sleep Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim commit 6b7db3cfb4b24f861435fa9c036df2ba0b5b18e0 Author: Nick Clemens Date: Fri Aug 21 13:38:37 2026 +0000 Bug 36549: Use Parallel::ForkManager in es_indexer_daemon This patch copies the implementation from the general background worked into the es_indexer daemon Note: There is a 'sleep(10)' in the general indexer and I copied it here, but I don't know why we do it? To test: 1 - Apply the patch 2 - sudo koha-es-indexer --restart kohadev 3 - perl misc/maintenance/touch_all_biblios.pl 4 - Wait a bit 5 - Check the background jobs in the admin interface 6 - Confirm the jobs finish and records are searchable 7 - Test with and without rabbitmq enabled: . Stop rabbitmq service: sudo -s service rabbitmq-server stop . Repeat steps 2 to 5 8 - Sign off Signed-off-by: David Nind Signed-off-by: Aleisha Amohia Signed-off-by: Pedro Amorim commit 7a5c6b6066a0e67c817acf5f694fba783b68c203 Author: Lawrence O'Regan-Lloyd Date: Thu Sep 10 19:16:17 2026 +0000 Bug 43513: Add .mailmap entries for Lawrence O'Regan-Lloyd This patch adds two entries mapping both addresses I commit from to a single identity, so the generated files pick up the right name the next time they are regenerated. Test plan: 1. Apply patch 2. Run: git check-mailmap "lawrenceol-clams " => SUCCESS: returns Lawrence O'Regan-Lloyd 3. Run: git check-mailmap "lawrenceol " => SUCCESS: returns Lawrence O'Regan-Lloyd 4. Run: git shortlog -sne | grep -i "regan-lloyd" => SUCCESS: a single entry, not two Assisted-By: Claude Opus 5 (Anthropic) Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit fb98e7c8099ca3ae0ed0641896b47da471718faf Author: Casey Conlin Date: Sat Sep 19 13:00:01 2026 +0000 Bug 43591: Bring back my libraries filter. This is a patch to bring back a small UI component that was dropped on the previously QA’ed and merged work in bug 16631. Before applying patch, confirm the filter option for Show reports is not available on the Saved Reports page 1. Pull the latest from Main 2. Enable LimitReportsByLibrary under Reports in System Prefernces 3. Visit the Save reports page 4. There should be NO Show reports with selectbox in the Filter pane on the left side 5. Implement the patch 6. Reload Save reports page 7. In the Filter pane on the left side, there should be a Show reports select box with options for Show my library reports and Show all reports options Confirm only permissioned users see this option and reports are filtered 8. Create a staff user with the all reports permissions including Manage Report Limits (manage_report_limits). Home library should be Centerville. 9. Create a staff user with all reports permission but NOT Manage Report Limits (manage_report_limits). Home library should be Centerville. 10. Create a report, “No limit” with no limit. 11. Create a report, “Centerville limit” limited to Centerville. 12. Create a report “Fairfield limit” limited to Fairfield. 13. Log in as the permissioned user. 14. Confirm the filter is available and that it filters reports so that only the No limit and Centerville limit reports show when My library reports only is selected. 15.Select All reports and all 3 reports should be in the list along with the Fairfield report . 16. Log in as the unpermissioned user. 17. The filter option for my / all reports should not be in the leftside pane. 18. Only the Centerville limit and No limit reports should be visible Signed-off-by: Anna Stalter Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit b09bc3c9485dfdad03d716ee5ced6f241ae4d330 Author: Owen Leonard Date: Thu Sep 17 09:32:30 2026 -0400 Bug 43519: Direct links to article request form still work when the feature is disabled This patch adds a check for the ArticleRequests system preference in opac-request-article.pl so that the page will return a 404 error if the preference is disabled. To test, apply the patch and restart services. - If necessary, enable the ArticleRequests system preference and configure a circulation rule to allow article requests. - Locate a bibliographic record in the OPAC which will accept an article request. Note the biblionumber of the record you select. - Click "Request article" and complete the process. It should finish successfully. - Disable the ArticleRequests system preference. - Return to the OPAC and navigate directly to the page for requesting an article: http://localhost:8080/cgi-bin/koha/opac-request-article.pl?biblionumber=X ...where X is the biblionumber you noted before. - This should trigger a 404 error. Sponsored-by: Athens County Public Libraries Signed-off-by: Bastien CHAUVET Signed-off-by: Laura_Escamilla Signed-off-by: Pedro Amorim commit 04314c4fbc6f1966e96f150f5733a6577ae6a65e Author: Owen Leonard Date: Mon Sep 14 08:30:46 2026 -0400 Bug 38948: Modal error on some pages: Can't access property "backdrop" This patch adds some checks to cookieconsent.js to avoid errors in the console: If we try to access 'document.getElementById("cookieConsentModal")' when the element doesn't exist there will be an error: 'Uncaught TypeError: can't access property "backdrop", this._config is undefined' The error can be seen in the browser console on the Circulation home page and the Tools home page when the CookieConsent preference is enabled. To test apply the patch and clear your browser cache if necessary. - Enable the CoookieConsent system preference. - Go to the Circulation home page. There should be no error in the console. - Clear your browser's local storage to forget your consent. - Go to the staff client home page. The cookie consent message should appear. Sponsored-by: Athens County Public Libraries Signed-off-by: Laura_Escamilla Signed-off-by: Jonathan Druart Signed-off-by: Pedro Amorim commit 9e0b6c39144992569497df3ae5aba0ef6fe6dfa7 Author: Paul Derscheid Date: Wed Sep 2 10:53:57 2026 -0400 Bug 42013: Fix missing confirmation dialog for "Remove all reserves" - The confirmDelete dialog for removing all reserves from a course was bound as a click handler on the #rm_items form element, which is never directly clicked by the user - The #rm_items_button click handler called .submit() on the form without checking confirmDelete first, bypassing the confirmation - Move the confirmDelete check into the #rm_items_button click handler and remove the dead #rm_items click handler Test plan: - Enable UseCourseReserves system preference (should be enabled in ktd) - Create a course (or use the existing one) and add at least one reserve to it - On the course details page, click "Remove all reserves" - Observe the form submits immediately without confirmation - Apply patch - Repeat the steps above - Verify a confirmation dialog now appears - Click cancel and verify the reserves are not removed - Click "Remove all reserves" again, confirm, and verify the reserves are removed Signed-off-by: Roman Dolny Signed-off-by: Brendan Lawlor Signed-off-by: Pedro Amorim commit cd3574bdda2311d56930d18b238f5793ad759272 Author: Lucas Gass Date: Wed Aug 26 16:41:23 2026 +0000 Bug 43383: Use checkbox status of :checked when doing cartsubmit or listsubmit To test: 1. Do a catalog search that brings up multiple results 2. Check the checkbox of in the left column for the first two results 3. Click on the title of the 3rd result to take you to the details page for that item 4. Use the borwser's back button to return to the search results 5. Notice the first 2 titles are still checked. 6. Now check the 3rd result and click 'Add to list' 7. Only the 3rd title is added, even though all 3 are checked. 8. Try steps 1 - 7 again but with 'Add to cart', same behavior. 9. Try setps 1 - 7 again but with 'Place hold', all 3 items are selected. 10. APPLY PATCH, clear browser cache and run through all the steps again. This time your selction should be rememebered. Bonus points for trying in as many browsers as possible. Signed-off-by: Bastien CHAUVET Signed-off-by: Brendan Lawlor Signed-off-by: Pedro Amorim commit 3b24981b898c6cef9c7f10e67f135dc77a083ac1 Author: Martin Renvoize Date: Thu Sep 17 16:38:22 2026 +0100 Bug 42608: (follow-up) Adapt tests to Bug 42310 calendar schema Bug 42310 landed on main after this patch's tests were written. It renamed Koha::Calendar to Koha::Library::Calendar and normalized the legacy repeatable_holidays/special_holidays tables into library_weekly_closures/library_single_closures (plus repeating closures and exceptions), managed via Koha::Library::Calendar::* DBIC-backed classes. The new subtests added for this bug still referenced the old class name and the dropped DBIC sources (RepeatableHoliday, SpecialHoliday), so t/db_dependent/Calendar.t and t/db_dependent/Hold.t failed after rebasing onto current main. Update both to build closures via Koha::Library::Calendar::WeeklyClosures/SingleClosures and to instantiate Koha::Library::Calendar, matching the convention already used elsewhere in these files since the Bug 42310 follow-up. No production code changes; test-only fix. Signed-off-by: Martin Renvoize Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 58d41bfedf98e4c9423858766aff213e70590ce6 Author: Martin Renvoize Date: Thu May 14 16:29:06 2026 +0100 Bug 42608: Stop hold pickup expiration from week-jumping over closures Koha::Hold::set_waiting calls Koha::Calendar::days_forward to derive the holds-shelf expiration date when ExcludeHolidaysFromMaxPickUpDelay is on. days_forward iterated next_open_days($dt, 1) ReservesMaxPickUpDelay times, and next_open_days consults get_push_amt for every closed day it encounters. Under useDaysMode=Dayweek, get_push_amt returns 7 for any closure that is not a permanently closed weekday -- so an intermediate Bank Holiday Monday inside the pickup window pushed the cursor a whole week forward instead of one day, inflating the expiration by seven days. Dayweek is a loan-due-date concept: it exists to keep a Friday-due loan due on a Friday across closures. A patron does not pick a weekday for a hold-shelf collection; staff set the expiration when they trap the item, and the only thing that should drive it is how many open days the patron should have to come and collect. days_forward is now decoupled from useDaysMode and always counts forward one open day at a time, ignoring closures without consuming them from the count. next_open_days, prev_open_days, get_push_amt and addDays are unchanged -- loan due-date math keeps the existing Dayweek behaviour. Test plan: 1. Inside KTD, run the updated unit tests: prove t/db_dependent/Calendar.t prove t/db_dependent/Hold.t Confirm both pass, including the new Bug 42608 sub-tests. These cover the full matrix of starting weekdays and useDaysMode values; the manual steps below are a single confirmatory pass through the UI. 2. Manual reproduction (UI only -- no database or CLI access needed): - Set sysprefs: useDaysMode=Dayweek, ReservesMaxPickUpDelay=6, ExcludeHolidaysFromMaxPickUpDelay=ON, ExpireReservesOnHolidays=ON. - Administration > Calendar: on a test branch, add one single (one-time) holiday -- not weekly/repeating -- on any weekday within the next 6 days that isn't already closed (e.g. the day after tomorrow, as long as it isn't a Sunday or other closed day). This one-off closure inside the pickup window is what triggers the bug. - Place a hold on an available item, then check the item in at that branch and confirm/trap it. This stamps waitingdate with today's date automatically -- no manual date entry required. - Check the hold's expiration date (Holds awaiting pickup list, or the patron's holds tab): Without the fix: expiration lands a full 7 days later than it should (today + 6 + 7), from the week-jump. With the fix: expiration is today + 6 open days, only skipping the one closed day. 3. Verify the existing Calendar mode behaviour is unchanged: - Switch useDaysMode to Calendar and repeat step 2 -- the same expected expiration date should apply. 4. Verify loan due-date behaviour is unchanged: - With useDaysMode=Dayweek, check out an item whose loan period would place its due date on the same closed day used in step 2. Confirm the due date still rolls forward by a whole week (the original Dayweek intent), proving this patch did not regress addDays/addDuration. Sponsored-by: OpenFifth Signed-off-by: Jackie Usher Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 9c3d3306e3f692b63381306678e602dd795fd988 Author: Owen Leonard Date: Fri Aug 28 13:47:31 2026 -0400 Bug 43237: (follow-up) Adding [% PROCESS 'i18n.inc' %] to two templates which lack it Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim commit 3d0b88df0032a65e5cf5d006bd4c383823eb3dbc Author: Owen Leonard Date: Fri Aug 14 14:03:44 2026 -0400 Bug 43237: Add 'Expand' column header to all OPAC responsive DataTables This patch updates several templates in the OPAC so that when a responsive DataTable is partially collapsed, the column with the "+" buttons has "Expand" in the column header. To test, apply the patch and test tables on the affected pages, narrowing the page enough to confirm that when the table collapses, the last column has "Expand" in the header.: - Authorities search results - The details of a course reserve (with titles on reserve) - The holdings table on the bibliographic detail page - Search history - Most popular As a logged-in user: - User summary page (all tabs) - Curbside pickups (with at least one curbside pickup scheduled) - Checkout history - Suggestions - Tags In self-checkout: - The checkouts, holds, and charges tabs. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim commit d486b1c68b19c37b9af0da16e1087a08a7973d03 Author: Pedro Amorim Date: Mon Sep 21 14:53:32 2026 +0000 Bug 43336: DBRev 26.06.00.028 Signed-off-by: Pedro Amorim commit 6d160313a2e89fe4fd7277e611b7005a13bd1c84 Author: Magnus Enger Date: Tue Sep 8 14:05:52 2026 +0200 Bug 43336: Remove support for LibrisSpellcheck The API that this feature was based on was removed by the Swedish National Library, so we can remove the code and sysprefs from Koha. Before testing: - Run this SQL in the database and verify the syspref is empty: SELECT value FROM systempreferences WHERE variable = 'OPACdidyoumean'; - Go to Administration > Did you mean? and verify there is a box for LibrisSpellcheck - Move the boxes around and click on "Save configuration" - Run the SQL again and verify the contents of the syspref are now something like this: [{ "name": "AuthorityFile"}, { "name": "LibrisSpellcheck"}, { "name": "ExplodedTerms"}] - Go to Administration > System preferences and search for "libris" - Verify the two sysprefs LibrisKey and LibrisURL show up To test: - Apply this patch and make sure the DB update is run. In KTD you can do: $ sudo koha-upgrade-schema kohadev The output from this should be like this: Removed system preference 'LibrisKey' Removed system preference 'LibrisURL' 'LibrisSpellcheck' was removed from the OPACdidyoumean syspref - Run koha-upgrade-schema again. The output should be: 'LibrisKey' syspref already removed 'LibrisURL' syspref already removed 'OPACdidyoumean' syspref does not contain a setting for 'LibrisSpellcheck' - Run the same SQL as before and verify that LibrisSpellcheck is now gone: [{"name":"AuthorityFile"},{"name":"ExplodedTerms"}] - Go to Administration > Did you mean? and verify there is no box for LibrisSpellcheck - Move the boxes around and click on "Save configuration" - Run the SQL again and verify that there is still no mention of LibrisSpellcheck - Go to Administration > System preferences and search for "libris" - Verify the two sysprefs LibrisKey and LibrisURL do NOT show up - Empty the OPACdidyoumean syspref by running this SQL: UPDATE systempreferences SET value = '' WHERE variable = 'OPACdidyoumean'; - Run koha-upgrade-schema again. The output should be: 'LibrisKey' syspref already removed 'LibrisURL' syspref already removed 'OPACdidyoumean' is not set Signed-off-by: David Nind Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 632017e0221b58eb7bee6f258f6bace7f48b9252 Author: Jonathan Druart Date: Tue Sep 15 12:13:19 2026 +0200 Bug 43267: Avoid flashing the wrong number of visible records Wait before DT has finished the init to display the number of visible records, otherwise there is a flash (display the count of the full set, then the number of records displayed (20)); Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 83f17afef6e3a73abc00b871fc0aab935db39d55 Author: Jonathan Druart Date: Tue Sep 15 12:10:39 2026 +0200 Bug 43267: Disable "Batch operations" menu when there's nothing to send So we don't send an empty set to the tool Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 26914173fde9047233fcfc825e37e1a63b59683c Author: Jonathan Druart Date: Tue Sep 15 12:10:25 2026 +0200 Bug 43267: Reports - only send visible records to batch operations from DT view When opening report results in the new DataTables view, batch operations should only send visible records. Same as the normal view. Test plan: 1. Create and run a report that will display more resulsts than fit on one page 2. Click "Open in DataTables". 3. Note "Batch operations with X visible records" shows the default page size (=20), and open the "Batch operations" dropdown to send results to e.g. batch item modification or batch record modification. 4. Confirm only the values on the currently visible page are sent, not the entire set. 5. Change the DataTable's page, or filter/search within it, and repeat => Confirm the count and the sent values update to the number of visible records 6. Confirm the standard (non-DataTables) report view is unaffected. Signed-off-by: Andrew Fuerste Henry Signed-off-by: Pedro Amorim commit 18aa5d1f4c397f5ba790a4082b843351919ceafd Author: Chloe Zermatten Date: Thu Sep 17 09:52:33 2026 +0000 Bug 10190: (QA follow-up): fixes phase six 1. add missing wrapper element 2. amend casing in cypress test 3. change method name so it is codespell-friendly 4. remove deprecated test from TestBuilder.t (used Overduerules which do not exist anymore. rely on 'Tests with composite FK in userpermission' for FK test coverage instead -> no replacement introduced.) 5. 'Bug 10190: Fix patron_categories permission format' changed the permission for GET requests to patron_categories to catalogue = 1, matching the Koha precedent for such endpoints. However, patron_categories still tested the endpoint with the old permission assigned. Amend this to complete the work started in that commit. 6. remove redundant delete statement in permission test: if the test fails, this means the db update has not run, and should. It would be incorrect for the db to still include the permission at the point where the test runs. Test plan: 1. run `npm run js:build` (or watch the js:watch output) 2. run t/cypress/integration/Admin/CirculationTriggers_spec.ts 3. run prove xt/author/codespell.t 4. run prove t/db_dependent/TestBuilder.t 5. run prove t/db_dependent/api/v1/patron_categories.t 6. run prove t/Koha/Auth/Permissions.t All should run with no warnings or errors. Assisted-by: Claude Opus 5 (Anthropic) Sponsored-by: Glasgow Colleges Library Group Signed-off-by: Pedro Amorim commit c96618f064d079e1d5ae3d5a4b284818fe40471e Author: Chloe Zermatten Date: Fri Sep 11 09:35:24 2026 +0000 Bug 10190: (QA follow-up): fixes phase five 1. apply html filter to letters so notice names are escaped (must be done in attribute so the JSON format of the letters can be parsed). 2. fix a correctness issue where the frontend was pinning the logged in library instead of the logged in user's home library, which would have led to 403s (correct) when saving rules. Since the library dropdown is deliberately disabled unless a user has the manage_circ_rules_from_any_libraries permission, the user would then have needed to use 'Set library' to match their home library to fix this. Prevent the issue by setting the library to the user's home library. Also rename the variable to user_library_id. 3. list_rules correctly references /api/v1/circulation_rules/kinds 4. make untranslatable strings translatable 5. swap svg for font-awesome icon. 6. avoid css duplication: - remove dead / unused scoped css (leftover from an early component extraction) - import vue.css and only leave the minimal override required. 7. improve set_rules test coverage: add tests for manage_circ_rules / manage_circ_triggers separation Test plan: 1) Administration > Circulation triggers: notice the 'Letter' dropdowns list circulation notices as "name (code)" and offer 'No letter'. (no regression) 2) Give a staff user 'catalogue' + 'manage_circ_triggers' only, with home library A. Log in as them, 'Set library' to B, and open Administration > Circulation triggers. Notice the view is pinned to A, and that adding and editing a trigger saves without a 403. (behaviour is now correct) 3) GET /api/v1/circulation_rules?rules=nosuchrule - notice the error points at /api/v1/circulation_rules/kinds. (behaviour is now correct) 4) Run 'gulp po:update --lang fr-FR'. Notice 'Add new trigger {triggerNumber}', 'No letter' and 'any' now appear in misc/translator/po/fr-FR-messages-js.po (behaviour is now correct) 5) Edit a trigger. Notice the delay's reset button is an 'x' inside the input, left of the chevrons, and clears the delay; the letter's reset button does the same for the notice. (no regression) 6) Notice no visual regression across the list, add, edit, reset and delete screens - select widths, chevrons and modals unchanged. Also run t/db_dependent/api/v1/circulation_rules.t Assisted-by: Claude Opus 5 (Anthropic) Sponsored-by: Glasgow Colleges Library Group Signed-off-by: Pedro Amorim commit 167622c08d84d794fe7cd3b2103b77dda604f860 Author: Martin Renvoize Date: Thu Sep 17 12:38:07 2026 +0100 Bug 40934: (follow-up) Fix false positive on --code/--exclude-code mutual exclusivity The mutual-exclusivity check ran before the empty-element cleanup added for bug 37075, so a bare -c (no value) left an empty string in @letter_code, which the check saw as truthy and rejected even though -c had effectively not been used. Move the cleanup above the check. Also add the same mutual-exclusivity guard directly in C4::Letters::SendQueuedMessages, since letter_code and exclude_letter_code build the same search key and passing both would otherwise let one silently clobber the other in the hashref passed to ->search - only the CLI script enforced this until now, so any other caller could hit the silent-clobber bug. Adds regression coverage: unit tests for the new exception in SendQueuedMessages, and a script-level test reproducing the RM's reported false positive. Sponsored-by: OpenFifth Signed-off-by: Pedro Amorim commit 2a652a8d124659d2af58a6dfa7fb86ee8dc72f0d Author: Nick Clemens Date: Fri Aug 21 14:22:02 2026 +0000 Bug 40934: (QA follow-up) Don't delete the queue We already delete the queue at the start of all tests and the tests here are checking using ID, there is no reason to delete the queue again Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim commit e6908ef0a72b0e9075963aacaaccd5ce1caf50b1 Author: Martin Renvoize Date: Tue Jan 20 13:00:28 2026 +0000 Bug 40934: (follow-up) --code and --exclude-code should be mutually exclusive Both options were being accepted but only the last one in the command line was being applied. Now they are mutually exclusive like --category and --skip-category in longoverdue.pl. Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim commit 3430793f078ff008d0b0918fe3c077923f014fdf Author: Martin Renvoize Date: Wed Jan 7 15:49:32 2026 +0000 Bug 40934: Add --exclude-code option to process_message_queue.pl Some libraries want to send digest messages once per day (e.g., at 20:05) but send all other messages every hour. Currently, this requires listing almost all letter codes (~85) in the hourly cron job, which is error-prone and makes it easy to forget notifications at upgrades. This patch adds a new --exclude-code (-x) option to process_message_queue.pl that allows excluding specific letter codes from processing, making it much easier to configure digest scheduling. Changes: - Added --exclude-code option to process_message_queue.pl (repeatable) - Modified C4::Letters::SendQueuedMessages to handle exclude_letter_code parameter - Supports both scalar and array reference formats Example usage: # Send all messages except digests every hour 00 */1 * * * process_message_queue.pl --exclude-code DUEDGST \ --exclude-code PREDUEDGST --exclude-code HOLDDGST \ --exclude-code AUTO_RENEWALS_DGST # Send all messages including digests once per day 05 20 * * * process_message_queue.pl Test plan: 1. Apply both patches 2. Run: ktd --shell --run 'prove t/db_dependent/Letters.t' 3. Verify all tests pass (should show 105 tests passing) 4. Create test messages in message_queue with different letter codes: - Insert messages with codes: DUEDGST, PREDUEDGST, ACQ_NOTIF, HOLD 5. Test single exclusion: misc/cronjobs/process_message_queue.pl --exclude-code DUEDGST - Verify DUEDGST messages remain pending - Verify other messages are processed 6. Test multiple exclusions: misc/cronjobs/process_message_queue.pl --exclude-code DUEDGST \ --exclude-code PREDUEDGST - Verify both digest messages remain pending - Verify non-digest messages are processed 7. Test combined with --code option (should work together): misc/cronjobs/process_message_queue.pl --code ACQ_NOTIF \ --exclude-code DUEDGST - Verify only ACQ_NOTIF messages processed (DUEDGST excluded anyway) 8. Test help output: misc/cronjobs/process_message_queue.pl --help - Verify --exclude-code option is documented Sponsored-by: OpenFifth Signed-off-by: Marion Durand Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim commit 2bf60ebf2139cf409de8ade280831173ec91b8c9 Author: Martin Renvoize Date: Wed Jan 7 15:48:56 2026 +0000 Bug 40934: Add tests for exclude_letter_code in process_message_queue.pl This patch adds unit tests for the new exclude_letter_code functionality in SendQueuedMessages, which will allow excluding specific letter codes when processing the message queue. Test coverage includes: - Excluding a single letter code (array format) - Excluding multiple letter codes - Excluding with scalar parameter format Sponsored-by: OpenFifth Signed-off-by: Marion Durand Signed-off-by: Nick Clemens Signed-off-by: Pedro Amorim commit 0dfcddf383d8239f7ae877f2f0935c0653276f61 Author: Slava Shishkin Date: Wed Sep 16 20:41:11 2026 +0300 Bug 43296: (follow-up) Fix perltidy This follow-up fixes the formatting issue reported by xt/perltidy.t. Test plan: 1. Run prove xt/perltidy.t 2. Confirm it passes. Signed-off-by: Pedro Amorim commit 18469d46c4b09d86c8e666f19ef276407eac8e64 Author: Pedro Amorim Date: Mon Sep 21 11:55:40 2026 +0000 Bug 42667: DBRev 26.06.00.027 Signed-off-by: Pedro Amorim commit 5694e63a8cb1c6342e66226120e060ed93b6c751 Author: Lucas Gass Date: Wed Sep 16 15:07:55 2026 +0000 Bug 42667: (follow-up) Fix edit button inside of preview SQL modal Signed-off-by: Pedro Amorim commit 3d7b5c5a953559dd7ce2d1fc8ef4459f8ca4c857 Author: Lucas Gass Date: Wed Sep 16 14:52:53 2026 +0000 Bug 42667: (follow-up) Update dropdown so users can only choose to edit own report Signed-off-by: Pedro Amorim commit 51d1fe94983ae9dfc7d66338b4ab2280c55d769e Author: Martin Renvoize Date: Thu Jun 11 16:13:14 2026 +0100 Bug 42667: (QA follow-up) Test edit permission on ownerless reports Add two test cases covering reports with no borrowernumber (NULL owner): a patron without edit_all_reports should be denied, one with the permission should succeed. The POD documents this case but it was not previously exercised. Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 5da8ba1ce9509d21b9644fa27422fd3dc90e2fb9 Author: Martin Renvoize Date: Thu Jun 11 16:12:52 2026 +0100 Bug 42667: (QA follow-up) Fix null guard and exception description - Add null check around Koha::Patrons->find() in guided_reports.pl before calling ->has_permission, matching the defensive pattern already used in Koha::Report::check_edit_permission - Add missing description to Koha::Exceptions::Report base class for consistency with its sub-exceptions Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 5b5c875df9e79479e83cf6813e57c8fc0632d7c7 Author: Kyle M Hall Date: Thu May 21 13:31:52 2026 -0400 Bug 42667: Enforce permission in Koha::Report Prevents possible template bugs from allowing editing of reports by others without the proper permissions. Signed-off-by: Kyle M Hall Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 1da4dcec000ba4cef13d4e66c6ccfeadf41824f0 Author: Kyle M Hall Date: Thu May 21 12:23:06 2026 -0400 Bug 42667: Hide edit controls as needed Test plan: 1) Apply this patch set 2) Run updatedatabase.pl 3) Restart all the things! 4) Create 2 users with create_reports and not edit_all_reports 5) Create reports with each 6) Note that each cannot edit the others reports 7) Create a user with create_reports and edit_all_reports 8) Note the this user can edit reports from the previous two users Edit button placements to look for: * Reports table row * Actions menu * Toolbar Signed-off-by: Kyle M Hall Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit df282a5f893f217eb99653578f9ccbcb1cea0949 Author: Kyle M Hall Date: Thu May 21 12:12:55 2026 -0400 Bug 42667: Require edit_all_reports to edit other librarian's reports Signed-off-by: Kyle M Hall Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit d2fa6156fdadadf398a2083d625e6649502a06aa Author: Kyle M Hall Date: Thu May 21 11:34:32 2026 -0400 Bug 42667: Add new edit_all_reports permission Signed-off-by: Kyle M Hall Signed-off-by: Brendan Lawlor Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 08a4e352af2b5a0bd53c8cebe8a77bcc99f72b20 Author: Jonathan Druart Date: Fri Sep 18 15:31:22 2026 +0200 Bug 42330: (follow-up) Tidy Something very messy happened during the last rebase before push. Sorry! I've restored the original version: git rebase -i HEAD~258 Edit commit b02ca1270d6eeb3 and remove the next one (Tidy) perl misc/devel/tidy.pl $(git diff --name-only HEAD~1) git commit -a git rebase --continue Luckily there was no conflict! I then picked the version of those files and here is the commit. Use this to confirm: `git show -w ad694a3411e677fcea96f315758793fd1fe0f203` You should see changes that are not related to tidiness Signed-off-by: Owen Leonard Signed-off-by: Pedro Amorim commit dfea14718301faf66f8389e74342a8adcdc59548 Author: Martin Renvoize Date: Thu Jun 18 17:01:00 2026 +0100 Bug 42385: (QA follow-up) Test PickupLibrary fall-through to ItemHomeLibrary The original _GetCircControlBranch tests covered the case where CircControl is PickupLibrary but no userenv branch is available, in which case the resolution falls through to the ItemHomeLibrary behaviour. That coverage was lost when the tests moved to t/db_dependent/Koha/Policy/Circulation.t, since the PickupLibrary subtest always mocks a userenv. This restores coverage for the fall-through path: with CircControl set to PickupLibrary, no userenv, and no pickup_library_id, the controlling library is resolved from the item's home library. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Policy/Circulation.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Martin Renvoize (cherry picked from commit 6a13c6e5066384e59e52f0d48f5a430958671ef2) Signed-off-by: Pedro Amorim commit 275d870be7a961ab60705f6327f74a2b0126132d Author: Tomás Cohen Arazi Date: Tue May 5 10:20:39 2026 -0300 Bug 42385: Remove _GetCircControlBranch Removes the deprecated _GetCircControlBranch function and its export from C4::Circulation. Removes the corresponding tests from Circulation.t (now covered by t/db_dependent/Koha/Policy/Circulation.t). Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Circulation.t \ t/db_dependent/Koha/Policy/Circulation.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize (cherry picked from commit 8e784622815a2db2ce6f558987d7c0b0951ceec0) Signed-off-by: Pedro Amorim # Conflicts: # C4/Circulation.pm # t/db_dependent/Circulation.t commit 4f1b98160eb294d91c0d446e30eb4bc177b8e753 Author: Tomás Cohen Arazi Date: Tue May 5 10:16:25 2026 -0300 Bug 42385: Use Koha::Policy::Circulation everywhere Replaces all calls to _GetCircControlBranch with Koha::Policy::Circulation->circ_control_library in: - C4::Circulation (10 call sites) - Koha::Item (1 call site) - Koha::Recall (1 call site) - reserve/request.pl (1 call site) - svc/letters/preview (2 call sites) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Policy/Circulation.t \ t/db_dependent/Circulation.t \ t/db_dependent/Koha/Items.t \ t/db_dependent/Koha/Recall.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 5c833281ed064d1fa70a0c373920d224fc399740 Author: Tomás Cohen Arazi Date: Tue May 5 10:12:51 2026 -0300 Bug 42385: Add Koha::Policy::Circulation Adds Koha::Policy::Circulation->circ_control_library($item, $patron) class method that resolves which library controls circulation rules, based on the CircControl and HomeOrHoldingBranch system preferences. This follows the same pattern as Koha::Policy::Holds->holds_control_library. An optional pickup_library_id parameter allows callers in API/daemon contexts to pass the library explicitly instead of relying on userenv. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Policy/Circulation.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Alex Carver [Acerock7] Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 255eeaf4f615a48f32d4d60e1ff4c882dff38d74 Author: Martin Renvoize Date: Wed Sep 16 08:38:51 2026 +0100 Bug 43375: (QA follow-up) Add test coverage for form-data fallback in userinfo parsing _get_data_and_patron() falls back to Mojo::Parameters form-data parsing whenever $tx->res->json fails to decode the userinfo response body. That branch was untested: all existing userinfo_url subtests mock json() to return a hashref, so the fallback path was never actually exercised. This adds a subtest that mocks a genuine url-encoded response body (json() returning undef) and confirms the fallback still maps data and finds the matching patron correctly. Test plan: 1. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Auth/Client/OAuth.t => SUCCESS: All 6 subtests pass, including the new fallback-path test 2. Sign off Co-Authored-By: Claude Sonnet 5 Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 8b1e8f80baa37cc8892d44ab10e1ea882a773ba8 Author: Tomás Cohen Arazi Date: Mon Aug 24 14:57:28 2026 -0300 Bug 43375: Use Mojo json() with form-data fallback for userinfo parsing This patch simplifies the userinfo response parsing by relying on Mojo::Message::Response->json which decodes JSON regardless of Content-Type header parameters. If JSON decoding fails (returns undef), it falls back to URL-encoded form data parsing. This fixes integration with APIs that return extra Content-Type parameters (e.g. Microsoft Graph returns odata.metadata, odata.streaming, and IEEE754Compatible alongside charset) which previously caused the strict regex to fail and silently misparse the response as form data. Test plan: 1. Apply the regression test (previous patch) 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Auth/Client/OAuth.t => FAIL: Subtest fails - Content-Type with extra params not recognized 3. Apply this patch 4. Repeat step 2 => SUCCESS: All tests pass 5. Sign off :-D Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Pedro Amorim commit 63ffc0b28fc758164f0aea6b4a6ba162a0bd03b7 Author: Tomás Cohen Arazi Date: Mon Aug 24 14:57:08 2026 -0300 Bug 43375: Regression tests This patch adds a regression test demonstrating that the OAuth userinfo_url response parsing fails when the Content-Type header contains extra parameters beyond charset (e.g. Microsoft Graph API returns application/json;odata.metadata=minimal;odata.streaming=true). The strict regex in _get_data_and_patron only matches Content-Type values with an optional ;charset=... suffix, causing valid JSON responses to be silently misinterpreted as URL-encoded form data. Test plan: 1. Apply this patch 2. Run: $ ktd --shell k$ prove t/db_dependent/Koha/Auth/Client/OAuth.t => FAIL: New subtest fails - email is undef, patron not found 3. Sign off :-D Signed-off-by: David Nind Signed-off-by: Pedro Amorim commit 6975b6616b3647cee3d507bd0f396aa6389584d2 Author: Olivia Reynolds Date: Thu Aug 6 14:20:58 2026 +0000 Bug 30319: Remove appropriate hidden fields on self-modification Previously, the system preference PatronSelfRegistrationBorrowerUnwantedField was used to remove hidden fields regardless of whether the operation was self-registration or self-modification. This patch uses the appropriate set of hidden fields depending on the current operation (create/update). Test plan: 1. Set OPACPatronDetails to "Allow". 2. Ensure PatronSelfModificationBorrowerUnwantedField is empty. 3. Set PatronSelfRegistrationBorrowerUnwantedField to exclude Title (towards the bottom right of the modal). 4. Log into the OPAC, and navigate to Your account > Personal details. 5. Change your title and submit the request. 6. Verify you see the notice "No changes were made." at the top of the page. 7. Apply patch. 8. Change your title again and submit the request. 9. Verify the request is submitted successfully. 10. Return to the personal details screen, but don't submit. 11. Set PatronSelfModificationBorrowerUnwantedField to exclude Title. 12. On the preloaded personal details screen, update the title and submit. 13. Verify you see the notice "No changes were made." at the top of the page. Sponsored-by: Open Fifth Signed-off-by: David Nind Signed-off-by: Lucas Gass Signed-off-by: Pedro Amorim commit 0fc43dd5a3fb70b3cd2b7e572acc747e26fe1f8d Author: Baptiste Wojtkowski Date: Wed Sep 16 13:48:03 2026 +0000 Bug 41742: (follow-up) Add pod to AddBudgetPeriod Create a pod coverage for AddBudgetPeriod Signed-off-by: Pedro Amorim commit 0ae6c196ecc59404f8d6ecd10d4bf437689f28a4 Author: Olivia Reynolds Date: Wed Sep 16 09:51:28 2026 +0000 Bug 39337: (follow-up) Mock OpacSuppression in Output tests Before the refactoring in this bug, redirect_if_opac_suppressed was intended to be called after checking OpacSuppression was enabled. Now it performs this check internally, so to adapt these unit tests correspondingly, we mock OpacSuppression to be enabled, as was the implied state before. Test plan: 1. Prove t/db_dependent/Output.t and verify all tests pass. Sponsored-by: Open Fifth Signed-off-by: Pedro Amorim commit bb05ef7ce8bface1d77704d415d83b336164ca5a Author: Pedro Amorim Date: Tue Sep 15 16:06:59 2026 +0000 Bug 42310: DBRev 26.06.00.026 Signed-off-by: Pedro Amorim commit 1b903bc3c58ee05f1a524726e513971423cd2c9b Author: Pedro Amorim Date: Tue Sep 15 15:52:35 2026 +0000 Bug 42310: (RM follow-up) Refresh stale DBIC checksum on Koha::Schema::Result::Branch Signed-off-by: Pedro Amorim commit 76d156d4fcc8672cf6e751de6d2a83be1bcf7453 Author: Tomás Cohen Arazi Date: Tue Sep 15 11:27:36 2026 -0300 Bug 42310: (QA follow-up) Clean up stale references to dropped calendar tables - cleanup_database.pl: rewrite DeleteSpecialHolidays to purge the new library_single_closures and library_closure_exceptions tables via their Koha::Objects classes (was querying the dropped special_holidays table). - kohastructure.sql: fix the comment header above library_repeating_closures that still referred to repeatable_holidays. - C4::Overdues: drop the dead GetSpecialHolidays / GetRepeatableHolidays / GetWdayFromItemnumber routines (unreferenced, exported nowhere) that still queried the dropped special_holidays / repeatable_holidays tables, along with the now-unused Date::Calc and Date::Manip imports. Signed-off-by: Pedro Amorim commit 51fd136eb11befc204f830fcb40ad2e04a7a7eb3 Author: Tomás Cohen Arazi Date: Mon Sep 14 10:58:14 2026 -0300 Bug 42310: (follow-up) Retire t/db_dependent/Holidays.t t/db_dependent/Holidays.t was a legacy file whose coverage is now provided by the two dedicated calendar test files. Its calendar behaviour assertions (is_holiday for weekly/day-month/single holidays) are already exercised by t/db_dependent/Calendar.t and t/db_dependent/Koha/Library/Calendar.t. The remaining unique cases queried the special_holidays / repeatable_holidays tables directly, which this bug drops during the migration to the Koha::Library::Calendar::*Closure schema, so the file could no longer run. This commit folds the unique coverage into t/db_dependent/Koha/Library/Calendar.t, rewritten against the new closure objects/API (no raw legacy-table SQL): - is_holiday DST edge case (America/Santiago days_between) - next_open_days / prev_open_days throwing NoOpenDays when the library is never open, and finding an open day created via an exception - copy_to completeness: repeating-closure copy, exception copy, and exclusion of past-dated single closures and exceptions, plus the no-duplication guarantee for all four closure types and then deletes t/db_dependent/Holidays.t. Test plan: - prove t/db_dependent/Koha/Library/Calendar.t - prove t/db_dependent/Calendar.t Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim commit 755521ba0f6f362b5390127c9876346c9f486fd9 Author: Tomás Cohen Arazi Date: Mon Sep 14 11:23:35 2026 -0300 Bug 42310: (follow-up) Make 16.12.00.032 upgrade self-contained The historical 16.12.00.032 upgrade step (Bug 12063) instantiated Koha::Calendar to push reserves.expirationdate forward by the max pickup delay in open days. Depending on a live application class from a frozen upgrade step is fragile: when this bug renamed and removed Koha::Calendar, the migration had to be edited to chase the new namespace. Frozen updatedatabase.pl steps should be self-contained and prefer direct DB access. Reimplement the holiday-aware date advance inline, reading the legacy repeatable_holidays / special_holidays tables (which still exist at this point in the upgrade path) directly, with no dependency on any Koha::* calendar class. This keeps the step working regardless of later refactors and removes the calendar-class reference from updatedatabase.pl entirely. The weekly / day-month / single-closure logic and exception (open override) handling mirror the historical C4::Calendar semantics. Signed-off-by: Tomás Cohen Arazi Signed-off-by: Pedro Amorim