Commit Graph

61654 Commits

Author SHA1 Message Date
Lucas Gass e4bb3afa5b
Koha 26.05.00 is here!
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:10 -06:00
Lucas Gass 0a68a90d39
26.05.00: Add release notes
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:10 -06:00
Lucas Gass 394f669003
26.05.00: Update kohastructure.sql
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:09 -06:00
Lucas Gass c24ce043df
26.05.00: Update history.txt
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:09 -06:00
Lucas Gass 49a792d898
26.05:00: Update contributors.yaml
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 14:16:02 -06:00
Jonathan Druart 147720ca1d
Bug 42606: Add Cypress tests
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 08:37:34 -06:00
Jan Kissig 9066cca3dd
Bug 42606: (QA follow-up): Fix order of checking for frameworkcode
This adds more verbosity to the check for frameworkcode and changes the order of setting a default value '' for it.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 08:37:34 -06:00
Nick Clemens bb47a5ffe6
Bug 42606: Check for default framework earlier
The code switches 'Default' to '' - we should just do it immediately after fetching from the template

1 - From the cataloging home page, click "New from Z39.50" without choosing a framework in the dropdown menu.
2 - Perform a Z39.50 search in the popup window, then click "Import" for one of the results. This triggers an error in the parent window:
3 - Error:Can't call method "is_fast_add" on an undefined value at /kohadevbox/koha/cataloguing/addbiblio.pl line 518
4 - Apply patch
5 - Reload and repeat
6 - Success!

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 08:37:33 -06:00
Jonathan Druart 7cdae514a4
Bug 27826: Turn on WebBasedSelfCheck to fix Cypress tests
On Jenkins, SCO is not setup like it is in ktd after a reset_all
from insert_data.pl
251 sub configure_selfcheckout {

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-26 08:37:26 -06:00
Lucas Gass 4f58ed8953
Bug 27826: (RM follow-up) Attempt to fix failing test
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-22 17:12:22 -06:00
Martin Renvoize 7a7a3ab2c6
Bug 40383: (follow-up) Fix EdifactModal Cypress test reliability
Three fixes to make all 27 EdifactModal Cypress tests reliably pass:

1. insertData.js: fix currency FK constraint violation (use an existing
   currency rather than creating an undefined one).

2. Koha/Edifact/File.pm: add missing use statements for File::Basename
   and File::Temp so the Cypress task can load the module.

3. EdifactModal_spec.ts:
   - Replace arbitrary cy.wait() calls with condition-based assertions
     throughout (expand/collapse animations, Bootstrap modal state).
   - Fix search timing: add cy.intercept + cy.wait("@ediMsg") in the
     Search Functionality beforeEach so initializeSearch is wired before
     input events fire; use invoke("val")+trigger("input") instead of
     type() to bypass the 500ms debounce race.
   - Fix modal close tests: attach a shown.bs.modal listener before
     opening the modal so we can wait for Bootstrap's 300ms show
     animation to complete (_isTransitioning → false) before calling
     hide(). Without this wait, hide() is silently blocked when the Ajax
     response is faster than the animation (common in KTD). Use
     bootstrap.Modal.getInstance().hide() as the programmatic fallback
     since data-bs-dismiss and keyboard events are unreliable in headless
     Cypress/Electron.
   - Fix edifact_interchange.js: remove duplicate &format=json appended
     to URLs that already contain it.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-22 12:59:11 -06:00
Martin Renvoize 7048a657e7
Bug 40383: (follow-up) Fix failing EdifactModal Cypress tests
Three issues caused the EdifactModal_spec.ts test suite to fail:

1. insertSampleEdifactMessages inserted a vendor with listprice='USD' and
   invoiceprice='USD', but those columns have FK constraints against the
   currency table and USD is not pre-populated in KTD's default install.
   Drop the currency columns from the INSERT so they default to NULL.

2. Koha::Edifact::File::vendor() and basket() called
   Koha::Acquisition::Bookseller and Koha::Acquisition::Basket without
   use-ing them. The edifactmsgs.pl table embeds both on every API call,
   so a missing module caused a 500 and an empty table.

3. showMessage() already appended &format=json before delegating to
   showMessageFromUrl(), which then appended it a second time. Remove the
   redundant copy from showMessage().

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-21 10:49:43 -06:00
Pedro Amorim b5efda989f
Bug 37762: (QA follow-up): Fix insertData.js
cypress run --spec t/cypress/integration/t/insertData.ts

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-21 10:21:40 -06:00
Roman Dolny 171f727734
Bug 41940: Remove uninitialized value warnings in circulation.pl
The warnings:

[WARN] Use of uninitialized value $patron_session_confirmation in split
   at /kohadevbox/koha/circ/circulation.pl line 493.
[WARN] Use of uninitialized value $patron_for_session in numeric eq (==)
   at /kohadevbox/koha/circ/circulation.pl line 494.
[WARN] Use of uninitialized value $session_confirmations in split
   at /kohadevbox/koha/circ/circulation.pl line 495.

appears in the plack-intranet-error.log.

Test plan:
==========
1. Use a fresh KTD, observe plack-intranet-error.log.
2. Have a barcode of existing item.
3. Find any patron and go to "Check out" tab.
4. Check out item.
==> Warnings should appear in plack-intranet-error.log
5. Apply the patch; restart_all.
6. Repeat 2-4 with another barcode.
==> No warnings in plack-intranet-error.log.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>

Bug 41940: (follow-up) Syntax corrections

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:58 -06:00
Owen Leonard 6572a5aec0
Bug 42638: Cannot delete an identity provider domain
This patch updates the identity provider domain page so that clicking
the "Delete" button from the list of existing identity providers works
correctly.

There's a lot of unfinished copy and paste from the SMTP servers page,
including a missing chuck of modal dialog HTML.

To test, apply the patch and go to Administration -> Identity providers.

- If necessary, add at least one identity provider.
- Click the "Manage domains" button for an identity provider.
- If necessary, add at least one identity provider domain.
- Click the delete button corresponding to the domain you added.
  - A confirmation modal should appear.
  - Clicking "Close" should close the modal without triggering any
    action.
  - Clicking "Delete" should delete the domain.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:58 -06:00
Jonathan Druart c1a369d274
Bug 42467: Init mmtas to an empty array
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:57 -06:00
Owen Leonard 561e8180ce
Bug 42467: Remove event attributes from MARC modification templates template
This patch removes several "onChange" event attributes from
marc_modification_templates.tt and moves the event handlers into
marc_modification_templates.js.

The patch also corrects a view minor zxlinting errors in the JS file.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> MARC modification templates.
- Create a new template if necessary.
- Click "New action."
- Test the behavior of dropdowns and checkboxes in the new action form.
  - Fields should be correctly shown or hidden based on the selected
    actions
  - Fields should be correctly shown or hidden based on the "RegEx"
    checkbox.
  - Text the conditional dropdown along with the "matches" dropdown.
    - Test that the "matches" regex fields are correctly displayed
      according to the checkbox.
- The browser developer console should show no "Content-Security-Policy"
  errors.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:57 -06:00
Owen Leonard 754659d9d0
Bug 42448: Staff Interface News (newsfooter) text does not have sufficient color contrast
This patch updates the CSS which controls the display of the news item
footer ("Posted by" and edit/new links) in order to improve
accessibility.

To test, apply the patch and rebuild the staff interface CSS.

- If necessary, create at least one news item with the display location
  "Staff interface."
- On the staff interface home page, look at the news items in the
  left-hand sidebar. The "Posted by" line should be clear. A check of
  the text's contrast should show that the contrast is appropriate.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:56 -06:00
Owen Leonard 1275a24115
Bug 42445: Remove event attributes from list creation template
This patch removes a couple of "onChange" event attributes from the
lists template in favor of defining the event handler in the footer JS.

To test, apply the patch and go to Lists -> New list.

- Choose "Private" from the public dropdown.
- In the "Allow changes to contents from" dropdown select "Permitted
  staff only"
  - A note should appear about the setting having no effect.
- You should see a similar note displayed when you select "Staff only"
  or "Anyone seeing this list"

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:56 -06:00
Owen Leonard 01a1696058
Bug 42442: Remove event attributes from bibliographic record merge template
This patch moves a couple of "onclick" event attributes from the
bibliographic record merge template, moving the event handling to the JS
block.

This patch also makes a minor change to make sure that the
framework code dropdown preselects the framework of the first of
the records to merge. This brings it in line with the authority
merge template.

To test, apply the patch and perform a catalog search which will return
multiple results including results with different frameworks. In the
standard test data a search for "green" will return two results with two
different frameworks.

- Check the checkbox for at least two records in your search results.
- Click "Edit -> Merge records" in the toolbar at the top of the
  results.
- On the "Merging records" page you should see a frameowrk dropdown. It
  should have preselected the framework corresponding to the first of
  the records you selected.
- When you click the radio buttons next to your records to merge the
  framework selection should change to match your selection..

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:55 -06:00
David Cook 00655de4d0
Bug 42317: Update minimum version for MARC::File::XML
This patch updates cpanfile to reflect the real minimum version
needed for MARC::File::XML. This is particularly important
due to vulnerabilities in version 1.0.1

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: mason james <mtj@kohaaloha.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:55 -06:00
Lucas Gass 1ed156ef40
Bug 42545: (RM follow-up) Tidy test file
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:54 -06:00
Martin Renvoize 0a0dcee152
Bug 42545: (QA follow-up) Add unit tests for holiday subtraction when return time is before due time
Adds a dedicated subtest covering the specific scenario: daily loans have a
due time of 23:59, so a return earlier in the day on a holiday would
previously cause days_between to exit its loop before processing the end
date, silently skipping the holiday subtraction.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:54 -06:00
Martin Renvoize 6ca7c1118b
Bug 42545: (QA follow-up) Add POD for _init and _holidays and fix incorrect test expectation
The existing 'days: 289 hours, 2 holidays' test asserted 8-1=7 but its own
description named 2 holidays. The expected value matched the buggy behaviour
(loop exiting before the holiday end date) rather than the correct result.
Update to 8-2=6 to reflect the fix.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:53 -06:00
apirak 9c38d74c98
Bug 42545: Koha::Calendar::days_between skips holiday subtraction for end date if time is early
In Koha::Calendar::days_between, the holiday-subtraction loop uses a comparison
that includes time. If the end_dt is a holiday and its time is earlier than
the start_dt time (common in renewals), the loop terminates before processing
the end_dt, leading to an extra fine day.

This patch truncates both dates to the beginning of the day after cloning
and setting the time zone, ensuring the loop correctly processes all
calendar days between the two dates.

Test Plan:
1. Set 'finesCalendar' syspref to 'noFinesWhenClosed'.
2. Set 'CalculateFinesOnReturn' syspref to 'Yes'.
3. Set 'finesMode' syspref to 'Production'.
4. Define a special holiday for today in the library calendar.
5. Identify an overdue item for a patron. Manually set its 'date_due' in the
   database to several days ago with a time of 23:59:00.
6. Renew the item today at any time BEFORE 23:59:00 (e.g., 10:00 AM).
7. Observe that an extra day of fine is charged because today (the holiday)
   was not subtracted.
8. Apply this patch.
9. Repeat the test and observe that the holiday is now correctly subtracted.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-20 09:04:47 -06:00
Jan Kissig cf984da25a
Bug 42412: Fix Incorrect date error in db-revs when using MySQL
In Bug 36466 db_revs/251200019.pl was introduced to update wrong date values (0000-00-00) with NULL.
This can fail on MySQL as it is running with sql_mode NO_ZERO_DATE activated which does not allow to select or update date fields with values='0000-00-00'.

This patch changes the update queries in db_revs/251200019.pl to use Installer::sanitize_zero_date on both columns.

Test plan:
As the test shall be done using MysQL and Mariadb start 2 ktds:
MySQL) DB_IMAGE=mysql:8.0 ktd --proxy --name mysql8 up -d
MariaDB) ktd --proxy --name maria up -d

a) checkout a version prior 36466: git checkout v24.11.14-1
b) reset_all
c) Connect to staff interface (mysql8-intra.localhost and maria-intra.localhost)
d) Go to Serials and create a new subscription
e) run the following to enter database client in each ktd shell: koha-mysql kohadev
f-mysql) run the following commands to be allowed to change planneddate and publisheddate to '0000-00-00':
 SET SESSION sql_mode = 'ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
 update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
f-maria)
 update serial set planneddate = '0000-00-00', publisheddate = '0000-00-00';
g) verify via: select * from serial;
h) checkout main via: git checkout main
i-mysql) run  updatedatabase
 Upgrade to 25.12.00.019  [09:35:55]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
        ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do Incorrect date error in db-revs when using MySQL

        In 36466 db_revs/251200019.pl
        for column 'planneddate' at row 1 at /kohadevbox/koha/C4/Installer.pm line 818
i-maria) do not run updatedatabase yet
j) apply patch
k-mysql) run  updatedatabase
Upgrade to 25.12.00.019  [09:37:02]: Bug 36466 - Fix the incorrect 0000-00-00 date in planneddate and publisheddate field
        Incorrect date planneddate and publisheddate fixed
...
-> is successful now
k-maria) run updatedatabase
l) verify via: select * from serial;

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-19 09:13:44 -06:00
Brendan Lawlor fef2a118e2
Bug 42637: Check if biblio exists before checking if it is fast add
This patch reorders code to make sure the biblio record exists before
checking if the framework is a fast add framework.

To test:
1. Go to a non existing biblio record like:
   http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=99999999
2. See a 500 error or in ktd:
   Can't call method "frameworkcode" on an undefined value
3. Apply patch and restart_all
4. Repeat step 1
5. Now you get the nice error message:
   The record you requested does not exist (99999999).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 16:05:41 -06:00
Lucas Gass ee01f1746c
Bug 38414: (follow-up) Fix OR operator
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 16:05:35 -06:00
Nick Clemens 9942ca9928
Bug 42603: Correct invoice_id variable
To test:
1 - Open a basket, place some orders, close the basket
2 - Receive shipments
3 - Select an order and click 'Receive selected'
4 - Nothing happens, error in console
5 - Apply patch, reload page
6 - Can successfully order

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:22 -06:00
Lucas Gass 1a0501f5e8
Bug 42262: encodeURIComponent for the 006 value
To test:
1- have a MARC record with Type of Material "BKS - Books" that does not have an 006 defined (biblio 1 in the KTD default data will work)
2- edit the biblio in the basic editor
3- open the tag editor for the 006
4- observe that the values along the top of the tag editor window show a value of "" (blank) in position 17
5- click Save in the tag editor window
6- confirm that the values in the 006 tag end with a space
7- open the 006 tag editor again
8- observe that the values along the top of the tag editor window no longer show any value for position 17. Instead, they end with the zero in position 16
9- click Save in the tag editor window
10- confirm that the values in the 006 tag now end with a zero, not followed by a space
11- save your biblio
12- edit the biblio in the basic editor again, get warning "The following fixed-length control field(s) have an invalid length: 006. Please fix."
13- APPLY PATCH and restart_all
14. Try editing the 006 value again, the whitespace should be preserved and you get no error.

Signed-off-by: Justin Swink <Justin.Swink@littleelm.gov>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:21 -06:00
Laura_Escamilla 88676495e0
Bug 42236: Add accessible label to OPAC user lists actions column
To recreate:
1. Log in to the OPAC
2. Create at least 1 list
3. Go to the "Your lists" page (opac-userlists)
4. Inspect the table header for the Edit/Delete column
5. Confirm the header contains no text

Test the patch:
1. Apply the patch
2. Repeat steps 1-3
3. Inspect the table header for the Edit/Delete column
4. Confirm the header now contains accessible text
5. Confirm Edit and Delete actions still function as expected
6. Run an accessibility checker and confirm the issue is resolved
7. Sign off and have a wonderful day! :D

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:21 -06:00
Kyle M Hall 7dc223b30a
Bug 42547: Fix SIP performance if sip2_resource_last_modified not set in cache
In Koha, the sip2_resource_last_modified key is updated any time the SIP config is edited from the SIP2 editor in the staff interface ( institutions, accounts, system preference overrides ).

If sip2_resource_last_modified is missing from memcached, Koha SIP emits "Couldn't find sip2_resource_last_modified, considering configuration not up to date" in the logs, and fetches the entire configuration from the database, *for each request*.

This causes SIP performance to drop significantly. In my production testing with 83 institutions and 171 accounts the login message response time dropped from 0.283 seconds to 2.899 seconds.

I think the solution is pretty simple. If there is a cache miss on sip2_resource_last_modified, SIP should load the config from database as it does already, but then it should also set sip2_resource_last_modified!

Test Plan:
1) Apply this patch
2) Prove t/db_dependent/Koha/SIP2/SIP2ModuleMigration.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:20 -06:00
Kevin Carnes c7ee854d9f
Bug 42176: Can cancel add authorized value
The cancel add authorized value button has no type, so it will submit the form.
This patch makes it a button so it does not submit the form.

Test plan:
1.  Ensure that the CreateAVFromCataloguing preference is enabled.
2.  Edit an item.
3.  Enter an authorized value that does not exist (e.g. shelving location).
4.  Select it to be able to create it.
5.  Click the Cancel button to not create a new authorized value.
6.  Observe that the form was sent or that a new authorized value was created.
7.  Delete the new authorized value.
8.  Apply the patch.
9.  Repeat steps 2-5.
10. Observe that the form was not sent or that a new authorized value was not
    created.
11. Sign off.

Sponsored-by: Lund University Library
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:20 -06:00
Jonathan Druart e109e09ae4
Bug 42581: Exclude plugins' routes from xt/api.t
If some plugins are installed and inject REST API routes, xt/api.t may fail.

Test plan:
You can install the Jump plugin (https://gitlab.com/joubu/koha-plugin-jump) and run xt/api.t
It will fail:
```
get /contrib/jump/parse -> uses tag 'parse' not present in top level list
get /contrib/jump/search -> uses tag 'search' not present in top level list
get /contrib/jump/search -> uses tag 'objects' not present in top level list
get /contrib/jump/static/static_files/commandPalette.js -> uses tag 'Jump' not present in top level list
get /contrib/jump/static/static_files/jump.css -> uses tag 'Jump' not present in top level list
[...]
```

Apply this patch and run `prove xt/api.t` again
=> It should pass

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:19 -06:00
Jonathan Druart 4da822b6a1
Bug 42578: Prevent Koha/Hold.t to fail on date comparison
We must use t::lib::Dates::compare to compare dates in test.

Test plan:
Confirm that `prove t/db_dependent/Koha/Hold.t` still returns green
after this patch

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:19 -06:00
Jonathan Druart 26abf4c73d
Bug 42521: (bug 39055 follow-up) Fix login from suggestion.pl
If you try to login from suggestion/suggestion.pl you get a 500

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception:
DBD::mysql::st execute failed: Unknown column 'login_op' in 'WHERE' at
/kohadevbox/koha/Koha/Objects.pm line 401

Test plan:
Logout
hit /cgi-bin/koha/suggestion/suggestion.pl
login
=> Without this patch you get a 500
=> With this patch applied you get the suggestion list view

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:18 -06:00
Eric Phetteplace f7071e91fe
Bug 42244: Fix JS TypeError on patrons ILL table
The multipleSelect plugin is used on the ILL requests table but is not
present when viewing a patron's ILL request history. This patch avoids a
JS TypeError by checking if the plugin exists before calling it.

To test:
- Enable ILLModule setting
- ILL Requests > New ILL Request
- Metadata doesn't matter but attach to a patron account, e.g. use the
"Acevedo" surname on KTD
- Go to the Patron > ILL requests history
- View browser's JS console, note TypeError
- Apply patch
- Refresh page, TypeError goes away

Signed-off-by: Chris Mathevet <chris.mathevet@inLibro.com>

Amended-by: Jonathan Druart
Tidy

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:18 -06:00
elias 850f1f224f
Bug 41373: Fix Mana report sharing when only one language is enabled
Test plan :
- Disable all but one language in system preference
  StaffInterfaceLanguages
- Start a local instance of Mana
  - Clone the mana repo on your machine (from
    https://gitlab.com/koha-community/koha-mana)
  - Edit compose/base.yml and uncomment the line:
    ${PWD}/sql/mana-sample.sql:/docker-entrypoint-initdb.d/test-data.sql
  - Run `bin/mana --skip-email-validation up -- -d` to launch mana and
    create a docker network koha will connect to
- Run `ktd --mana up -d` to connect koha to mana
- In Koha staff interface, go to "Administration » Share content with
  Mana KB":
  - Set "Share content with Mana KB" to "Yes", click "Save"
  - Fill the form under "Configure Mana KB", click "Send to Mana KB"
- Try to share a report to mana. Go to Mana UI to verify that the report
  was correctly shared

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Emmanuel Bétemps <e.betemps@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:17 -06:00
Jan Kissig 4a71a8476e
Bug 42466: Fix ignored form validation on paycollect
When UseCashRegisters is enabled and a change value bigger than 0 exists (the amount tendered is bigger than the amount paid) the form could be submitted without a required cash register.
The modal dialog informing of the change value would simply ignore missing other required fields.

Also warnings on 'Amount tendered' did not disappear when 'Amount being paid' was set to a higher value and later reset to a lower value than  'Amount tendered'.

This patch fixes both issues by moving the modal dialog (confirm change money) to the form validations submit handler and by validating the form on each update of 'Amount tendered' or 'Amount being paid'.

Test plan:
a) enable UseCashRegisters and create one under /cgi-bin/koha/admin/cash_registers.pl?op=add_form
b) create a manual fee (f.e. 10) f.e. via /cgi-bin/koha/members/maninvoice.pl?borrowernumber=16
c) There are several ways to reach the 'Pay an amount toward all charges' form:
  - Patron -> Accounting -> (Tab) Make a payment
  - Patron -> Details -> Attention -> Pay all charges
d) enter the follwing values
  - Amount being paid: 7
  - Amount tendered: 6 -> a warning will appear : Please enter a value greater than or equal to 7.
e) set
  - Amount being paid: 5 -> The warning remains visible: Please enter a value greater than or equal to 7.
f) Click confirm -> Modal which wants you to confirm that there is a change left.
g) Click yes. The form will be sent even though the required filed 'Payment type' is not set.
h) go to the payments form again. Total amount outstanding should be 5.00 now
enter the following so that change is > 0.00
 - Amount being paid: 3
 - Amount tendered: 4
 - Payment type: Cash
i) Click confirm -> Modal which wants you to confirm that there is a change left.
j) Click yes. You will see an Error trace page

As long as 'Change to give' is other than 0.00 you will be able to send the form.

Apply patch:
l) repeat b) until e) and check that the warning disappears when Amount being paid is lower or equal than Amount tendered
m) check that clicking Confirm will not send the form
n) check that when Payment type is set to Cash, the Cash register is required to send the form.

Signed-off-by: David Nind <david@davidnind.com>

Amended-by: Jonathan Druart
Tidy
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:17 -06:00
Jan Kissig f4678e5b23
Bug 42398: Reimplement form validation to news
This patch reimplements form validation on news (additional contents). The form.validate() call which adds a submitHandler is moved outside the document ready block in order to work again.
Markup like class=required is added to meet JS10 guidelines. JS alerts (when default title or default content was empty) were replaced by setting focus the required field.

Test plan:

a) go to /cgi-bin/koha/tools/additional-contents.pl?category=news (Tools -> News)
b) click either 'New entry' or 'New entry using text editor'
c) enter a required publication date
d) save the form. You will not be required to enter a default title or content.
e) apply patch followed by a restart_all
f) go to /cgi-bin/koha/tools/additional-contents.pl?category=news (Tools -> News)
g) click either 'New entry' or 'New entry using text editor'
h) check that title and content in the 'Default' tab are marked as required
i) try to send form f.e. when only title and content in 'English' tab are set
j) check if default title or content is missing the default tab is shown and the field gets focused

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:16 -06:00
Andrew Fuerste Henry 186ec335db
Bug 42570: Use count_holds for OPAC patron summary pending holds
To test:
1 - enable DisplayAddHoldGroups
2 - place two ungrouped holds for a patron
3 - log into the opac as your patron, see 2 pending holds
3 - group the two holds
4 - reload OPAC, still see 2 pending holds
5 - Apply patch, restart_all
6 - reload OPAc, see 1 pending holds
7 - ungroup holds
8 - reload OPAC, see 2 pending holds

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:16 -06:00
Pedro Amorim e931157dc7
Bug 42255: Add tests
prove t/db_dependent/Reserves.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:15 -06:00
Pedro Amorim e56c9cc9bb
Bug 42255: Maximum total holds allowed (count)
Make 'Maximum total holds allowed (count)' (aka max_holds) consider hold groups

Test plan:
Same as the previous test plan, but set 'Maximum total holds allowed (count)' as 2 and instead set 'Holds allowed (total)' as unlimited.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:15 -06:00
Pedro Amorim d5f130da5a
Bug 42255: Holds allowed (total)
Make 'Holds allowed (total)' (aka reservesallowed) consider each hold group as an individual hold

Test plan:
1) Enable DisplayAddHoldGroups sys pref
2) Set Holds allowed (total) to 2, visit:
http://localhost:8081/cgi-bin/koha/admin/smart-rules.pl
3) Scroll to the right, click the 'Edit' button under 'Actions' column.
4) On the 'Holds allowed (total)' column cell, enter '2' and click 'Save' under the 'Actions' column to the right.
5) Search  for 'test':
http://localhost:8081/cgi-bin/koha/catalogue/search.pl?q=test
6) Tick the checkbox next the first and second results, click 'Place hold' button at the top toolbar
7) Search for 'koha' user and pick Koha (42)
8) Set a pickup location for each hold and tick the 'Treat as hold group' checkbox. Click 'Place holds'.
9) Try to place another single hold for the same patron. Should succeed, because the 2 grouped holds count as 1. Patron now should have 1 group + 1 ungrouped hold = effective count of 2.
10) Try to place yet another hold, should be blocked with a tooManyHolds error.
11) Prior to this patch, step 9 would've failed because the 2 grouped holds counted as 2.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-18 09:30:08 -06:00
Lucas Gass 11d7450e2a
Bug 37762: (RM follow-up): Tidy t/db_dependent/api/v1/iso18626/request.t
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:13 -06:00
Pedro Amorim 6847e6d002
Bug 37762: (QA follow-up): Display translatable string directly on template
No script.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:13 -06:00
Pedro Amorim 06c4b3c138
Bug 37762: (QA follow-up) Utilize format_datetime
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:12 -06:00
Pedro Amorim 4b525d9e3e
Bug 37762: (QA follow-up): Warn and return 500 on schema validation failure in progress_request
An exception is not implemented as progress_request is called in
different circulation contexts (hold is placed, checkout happens,
etc) and those actions should not be dependent on the outcome of
progress_request, i.e. if progress_request fails due to schema
validation failure, the circulation action should happen as before.

prove t/db_dependent/Koha/ILL/ISO18626/Request.t
prove t/db_dependent/api/v1/iso18626/request.t
cypress run --spec t/cypress/integration/ILL/SupplyingRequests.ts

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:12 -06:00
Pedro Amorim 56d4be4cc2
Bug 37762: (QA follow-up): Add translatability to missing strings
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:11 -06:00
Pedro Amorim 843513d8ff
Bug 37762: (QA follow-up): Remove v-html directive from ShowElement.vue
This reimplements how patronAutoComplete behaves on ShowElement, keeping the same functionality but dropping v-html

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-15 08:11:11 -06:00