Commit Graph

60445 Commits

Author SHA1 Message Date
Pedro Amorim ffae0400a7
Bug 41849: Add 'Cancel all holds in this hold group' button
To the same filled holds check in modal

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 15c63014ef)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 43eece0ee4
Bug 41849: Add cancel hold_group REST API endpoint
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5ae5ac3330)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 3ba10d3a6b
Bug 41849: Add hold_group info to the filled holds check in modal
This adds the same hold group info (with a link to the patron's holds)

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 334337aa46)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 4dd411e40e
Bug 41849: Preparation: DRY the hold_group info block for reusability
Added in bug 41957

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61e5f97b31)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 4b7f4ba9bc
Bug 41957: (QA follow-up) Add tt filter to link variable
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd31a11131)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim b07e1244a2
Bug 41957: Show hold group information on 'Hold found' modal
Test plan:
1) Enable DisplayAddHoldGroups
2) Go to 'Henry' and click the 'Search to hold' button:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=19
3) Search for keyword 'test'. Click the 'Search' button.
4) On the search results page, click the 'Select all' option at the top
5) Click the downward arrow in the 'Place hold' toolbar button.
6) Pick 'Place hold for Henry Acevedo'
7) Tick the 'Treat as hold group' checkbox.
8) Set a pickup location for each of the holds.
9) Click 'Place holds'.
10) Check-in one eligible item (from one of the 3 records we just placed holds on) e.g.: 39999000001310
11) Notice the 'Hold found' modal now shows 'Part of a hold group' with a link directly to the patron's holds.

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 55a934fc0d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Andrew Fuerste Henry 25885fdc4d
Bug 41953: (QA follow-up) Add html filter to TT variable
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3490c1a90c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Andrew Fuerste Henry b630d414f8
Bug 41953: Add empty column value for ungrouped holds
Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b6bd98c0f9)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 5134a34d58
Bug 41953: Make it obvious that '(part of a hold group)' is expandable
Test plan:
1) Enable DisplayAddHoldGroups
2) Go to 'koha' patron and click the 'Search to hold' button:
<staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=51
3) Search for keyword 'music'. Pick 2 results with available items by ticking the checkbox next to each record.
4) Click the downward arrow in the 'Place hold' toolbar button.
5) Pick 'Place hold for koha'
6) Tick the 'Treat as hold group' checkbox.
7) Set a pickup location for each of the holds. Click 'Place holds'.
8) Repeat steps 3 to 7, but pick 2 other records (creating a second hold group).
9) Log in to the OPAC as the 'koha' user:
<opac_url>/cgi-bin/koha/opac-user.pl
10) On the summary, click the 'Holds' tab.
11) Notice a new 'hold group' column is shown, similar to Staff UI
12) Notice the 'Part of a hold group' bit is now visually an expandable link, reflecting its behaviour

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acc2d6aa99)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim e89e41dd68
Bug 41953: Add hold group column to OPAC holds table
Only displayed if DisplayAddHoldGroups is enabled

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6f410c3797)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim d0c8035c6c
Bug 41878: Add tests
Run these and all other holds groups related tests:

prove t/db_dependent/Koha/Patron.t
prove t/db_dependent/api/v1/patrons_hold_groups.t
prove t/db_dependent/Koha/Hold.t
prove t/db_dependent/Reserves/HoldGroup.t

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e09b40ff1c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Pedro Amorim 1a6299a942
Bug 41878: Add Hold logging when grouping/ungrouping
Test plan:
-Enable DisplayAddHoldGroups and HoldsLog sys prefs
-Place 2 or more holds for a patron (regular, not grouped)
-Find the reserve_id for one of the holds, and view it in Tools > Logs. There will be an entry for the hold's creation.
-From the patron's account, select the holds and click 'Group selected'
-Run the log for the reserve_id, note that there is an entry generated by putting the hold into a group
-Suspend the hold, then view the log for that reserve_id. Note that the log entry for the suspension includes the hold_group_id.
-From the patron's hold tab, click on the number in the 'Hold group' column, then select 'Ungroup hold'
-Run the log for the reserve_id, and note that there is a new entry for ungrouping the hold

Signed-off-by: Bob Bennhoff <bbennhoff@clicweb.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7dfc0db168)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Janusz Kaczmarek 38f93969a2
Bug 41859: Authority search autocomplete results not consistent with search results
When cataloging and using authority plugin, there is auto complete
feature. But hints it produces are not consistent with search
results made with the same operator. E.g. (with standard KTD test
data set) typing 'reusability' in 'Search main heading'/'Search
all headings'/'Search entire record' gives no hints but one result
("Computer software Reusability.")

It does not seem logical.

Test plan:
==========
1. Have a standard KTD installation.
2. Start cataloging. Open authority plugin for any controlled field
   (e.g. 100). Start typing 'Peter' (in any input field) with the
   intention to find a person with the first name Peter (observe
   that search type is set to 'contains'). You will get no hints,
   despite of the existence of some Peters in the authority file.
3. Press Search button. You will have a few results containing
   'Peter'.
4. This is not what we expect. We expect that the hints are consistent
   with the search results.
5. Apply the patch ; clear the browser cache.
6. Repeat 2. You should get the hints now.
7. Change the search type to 'starts with'. Start typing 'Peter' - no
   hints now. Start typing e.g. davi... - the are a few hints from
   surnames.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7ccf568797)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Owen Leonard 6ef75bb6ac
Bug 41760: Fix <tbody> and <tfoot> in several templates
This patch makes corrections to table markup in several templates,
fixing these issues:

- <tfoot> appearing before <tbody>
- <tfoot> appearing without a <tbody>

To test, apply the patch and view the following pages in the staff
client. In each case the table should look correct, including the
appearance of the table footer.

- Acquisitions -> Vendor -> Basket. Add orders to a basket if necessary,
    in order for the "Orders" table to appear.
- Acquisitions -> Vendor -> Basket -> Add to basket -> From existing
    orders (copy) -> Search for orders. You must have existing orders to
    populate the table of order search results.
- Acquisitions -> Vendor -> Receive shipments -> Receive a new shipment.
    You must have pending orders to populate the table. Receive at least
    one order to ensure data for the next step.
- Acquisitions home page -> "All available funds" table -> Click an
    amount linked in the "Spent" column.
- Administration -> Funds. You must have at least one budget and at
    least one fund under that budget.
- Administration -> Record overlay rules.
- Patrons -> View a patron record -> Accounting -> Transactions. If
    necessary you can use "Create manual invoice" to add a charge to the
    account.
    - From the list of transactions, click the "Pay" button next to one
      of them.
- Reports -> Cash register statistics wizard.
    - ??
- Reports -> Catalog by item type.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f0b70d1af4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Saiful Amin c2304fbc45
Bug 41383: SIP2 server does not search patrons by unique patron attributes (alternate IDs unusable in SIP2)
Currently, Koha::Patrons->find_by_identifier only searches for patrons by userid and cardnumber.

This patch extends this method to also search by unique borrower attributes (where unique_id=1).
This enhancement allows modules like SIP2 to identify patrons using alternative unique identifiers
defined in the system.

Test Plan:
1. Test current behaviour:
   - Go to Administration -> Patron attribute types
   - Create a new Patron attribute with:
      - Patron attribute type code = "AltID"
      - Description = "Alternate ID"
      - Unique identifier checkbox selected
      - Save
   - Edit any patron record and go to Additional attributes and identifiers
      - Add a value "altid123" to "Alternate ID"
      - Save
   - Use any SIP2 client to search for the patron using this attribute value. e.g.,
     `perl misc/sip_cli_emulator.pl -su term1 -sp term1 -l CPL --host localhost --patron altid123 -m patron_information`
   - Verify that the patron is NOT found with this message:
     'AFInvalid cardnumber'
     e.g.:
     READ: 64YYYY          00120260304    104611000000000000000000000000AOCPL|AAaltid123|AE|BLN|AFInvalid cardnumber|

2. Apply the patch.

3. Run the tests:
   prove t/db_dependent/Koha/Patrons.t
   - Verify that all tests pass, including the new cases for unique attribute lookup.

4. Test with patch applied:
   - Use any SIP2 client to search for the patron using this attribute value. e.g.,
     `perl misc/sip_cli_emulator.pl -su term1 -sp term1 -l CPL --host localhost --patron altid123 -m patron_information`
   - Verify that the patron is found with this message:
     'AFGreetings from Koha.'
     e.g.:
     READ: 64              00120260304    104328000000000000000000000000AOCPL|AA23529001000463|AEEdna Acosta|BLY|BHUSD|BV0|CC5|BD7896 Library Rd. Portland, OR 44240|BF(212) 555-1212|PB19800424|PCPT|PIY|AFGreetings from Koha. |

5. Test non-unique attribute:
   - Go to Administration -> Patron attribute types
   - Edit "Alternate ID" attribute type
      - Unique identifier checkbox NOT selected
      - Save
   - Use any SIP2 client to search for the patron using this attribute value. e.g.,
     `perl misc/sip_cli_emulator.pl -su term1 -sp term1 -l CPL --host localhost --patron altid123 -m patron_information`
   - Verify that the patron is NOT found with this message:
     'AFInvalid cardnumber'
     e.g.:
     READ: 64YYYY          00120260304    104611000000000000000000000000AOCPL|AAaltid123|AE|BLN|AFInvalid cardnumber|

6. Sign-off

Signed-off-by: Syed Faheemuddin <faheem@nexuslib.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7cdba6ba02)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Tadeusz „tadzik” Sośnierz 9c35f68b75
Bug 42302: Fix xgettext.pl's STDOUT output
xgettext.pl tries to produce output to STDOUT by default, but fails
because of an error in the code. It should go to the actual STDOUT
instead of a file named '&STDOUT'.

Test plan:
1. Run xgettext.pl:
     echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles
     ./misc/translator/xgettext.pl -vaf transfiles
2. Observe no standard output, and the existence of a file
   called `&STDOUT`. Output to the screen is:
     echo koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc > transfiles
     kohadev-koha@kohadevbox:koha(main)$ ./misc/translator/xgettext.pl -vaf transfiles
     ./misc/translator/xgettext.pl: Outputting to STDOUT...
     ./misc/translator/xgettext.pl: Opening input file list "transfiles"
     ./misc/translator/xgettext.pl: Processing file "./koha-tmpl/opac-tmpl/bootstrap/en/includes/serial-status.inc"
3. Apply the patch.
4. Run again.
5. Observe that information is output to the screen (see example of
   outpunt in the bug comment).

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>
(cherry picked from commit 0bcf87df38)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:16 +01:00
Lucas Gass 573ddcc45d
Bug 41883: logaction when batch modifying holds
To test:
-APPLY PATCH and restart_all
-Place a hold
-Run the Holds log using the hold's reserve_id. There will be a single entry for the hold's creation.
-Find the hold using the batch hold modification tool, and update its pickup location
-Look at the action log, the chnage should be logged
-Try batch modding holds in other ways, ensure the changes are logged
-Turn off HoldsLog and batch modify some holds, the changes should NOT be logged.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d345453a23)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jacob O'Mara 51a8e4085a
DBRev 25.11.04.006
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Tomás Cohen Arazi 8ee72c38bb
Bug 42273: Fix 'idenfity' typo in categories table
The categorycode column comment in the categories table had a typo:
'idenfity' instead of 'identify'. This fixes it in kohastructure.sql
and adds an atomic update to correct existing installations.

Test plan:
1. Apply this patch
2. Run:
   $ updatedatabase
=> SUCCESS: The atomic update is applied
3. Verify:
   echo "SHOW FULL COLUMNS FROM categories WHERE Field='categorycode';" | koha-mysql kohadev
=> SUCCESS: The comment reads 'unique primary key used to identify the patron category'
4. Sign off :-D

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 894e144303)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jacob O'Mara 9b4981a515
DBRev 25.11.04.005
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Kyle M Hall 16f221ec8c
Bug 42053: Add sip2 to userflags if it doesn't exist
Bug 37893 only creates the sip2 userflag if the instance has a
SIPConfig.xml set up. This userflag needs to be created reguardless
or the instance will not be able to use SIP in the future!

Test Plan:
1) Ensure you have no SIPConfig.xml
2) Run the bug 37893 update
3) Note the missing userflag
4) Apply this patch
5) Run updatedatabase.pl again
6) Note the userflag exists!

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 38e2b4b991)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Tomás Cohen Arazi 2e3a222e35
Bug 41944: Fix template error for non-existent ILL requests
This patch fixes a template error that occurred when attempting to view
a non-existent ILL request in the staff interface. Previously, navigating
to ill-requests.pl with an invalid illrequest_id would result in a 500
error and a stacktrace.

The Perl-side fix (output_and_exit with 'unknown_ill_request') was already
applied. This patch adds the template-side guard: wrapping the ILL content
with [% UNLESS blocking_error %] to prevent processing ILL-specific content
when the request doesn't exist, following the same pattern used in
serials/subscription-detail.tt and members/moremember.tt.

Test plan:
1. Ensure KTD is launched with Rapido ILL plugin and bootstrapped:
   $ ktd --proxy --name rapido --single-plugin ~/git/koha-plugins/rapido-ill up -d
   $ ktd --shell
  k$ cd /kohadevbox/plugins/rapido-ill/scripts
  k$ perl bootstrap_rapido_testing.pl
  k$ restart_all
2. Log into the staff interface at http://rapido-intra.localhost.
3. Point your browser to a non-existent ILL request, e.g., http://rapido-intra.localhost/cgi-bin/koha/ill/ill-requests.pl?op=illview&illrequest_id=1000
=> SUCCESS: An 'ILL request not found.' message is displayed, consistent with other not-found pages in Koha.
4. Sign off :-D

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 39352eabb1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jan Kissig 405b8ade7f
Bug 28297: Allow syspref text fields to be saved when content changed to original value
This fixes the behavior on changed system preferences in HTML input text fields. Preferences which are changed back to the original value can be saved now without reloading the system pref page.
This will only affect input fields with type=text as they have the property defaultValue which is checked to highlight a field as 'modified'.

Testplan:
a) take a syspref with an HTML text input field f.e. AccessControlAllowOrigin
b) write '*' into the iput field. Notice that the preference is marked 'modified'. Click 'save'
c) now got to the text field again and delete that '*'. Notice the preference does not get marked as modified and can theefore not be saved.
d) apply patch and reload page
e) repeat b) and c) and notice that the preference gets marked 'modified' on both cases.

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>
(cherry picked from commit 581c9b39bb)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Laura_Escamilla 663d263c17
Bug 42142: Improve accessibility of login settings toggle button
Test plan:
1. Log in to the staff interface
2. Click on the logged in menu dropdown
3. View source or inspect the markup for the login settings toggle
   (gear button)
4. Confirm the icon element has aria-label="Toggle panel for login
   settings"
5. Confirm the interactive element does not expose aria-expanded
6. Paste the page source into the W3C Markup Validation Service
7. Confirm the validator reports that aria-label must not be specified
   on the i element

Apply the patch:
8. Repeat steps 1-3
9. Confirm the aria-label has been moved from the i element to the
   toggle link
10. Confirm the i element now uses aria-hidden="true"
11. Confirm the toggle exposes aria-expanded="false" before opening the
    panel
12. Activate the login settings toggle
13. Confirm the panel opens and aria-expanded changes to "true"
14. Activate the toggle again
15. Confirm the panel closes and aria-expanded changes back to "false"
16. Paste the updated page source into the W3C Markup Validation Service
17. Confirm the validator error is resolved
18. Sign off and have a great day!

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4c3352f33)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jonathan Druart 7590de142d
Bug 41476: Fix plugins table when one of the plugin has errors
I've tried to install one of my old plugin and it exploded.

https://gitlab.com/joubu/koha-plugin-jump

Test plan:
Install a broken plugin and notice the Datatable error on the plugins
list
With this patch applied the error is gone

Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit daa1b20312)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass cf543d0010
Bug 41880: Add a unit test for item level holds logging
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>
(cherry picked from commit 7fd1ff8e89)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass e65eea1690
Bug 41880: Add a unit test
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>
(cherry picked from commit 27b76f9bf3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 57251668af
Bug 41880: Keep original copy of hold for proper logging
To test:
0. APPLY PATCH, restart_all.
1. Make sure HoldsLog is enabled
2. Place a record/bib level hold on bib A.
3. Move the hold to bib B.
4. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should see nothing about itemnumber because this is a record level hold.
5. Ensure that the New and Old biblionumbers are the correct ones.
6. Place an item level hold on item A.
7. Mobe the hold to item B
8. Look at the diff column in the holds log. You should see the Old (0) biblionumber and the New (N) biblionumber. You should also see the New and Old itemnumbers since this is an item level hold.
8. Ensure that the New and Old biblionumbers AND the New and Old itemnumbers are correct.

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>
(cherry picked from commit 8357a8f074)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Pedro Amorim e76356bfbf
Bug 42238: Fix loading 'holds' tab when navigating with hash
I don't know what caused this to stop working. Possibly a change in the
markup due to a bootstrap upgrade?

Test plan:

Before applying patch:
1) Place any hold for Henry, link to help:
   <staff_url>/cgi-bin/koha/reserve/request.pl?biblionumber=76&findborrower=23529000035676
2) Open a new tab and visit the Patron details page directly on the
   'Holds' tab:
   <staff_url>/cgi-bin/koha/members/moremember.pl?borrowernumber=19#holds_panel
3) Notice it activates the correct tab, but doesn't load the table.
4) Open a new tab again, this time visit the Patron 'Check out' page
   directly on the 'Holds' tab:
   <staff_url>/cgi-bin/koha/circ/circulation.pl?borrowernumber=19#holds_panel
5) Notice the same behavior (tab activates, no table is loaded).
6) Apply patch. Repeat test plan. Confirm table loads on both
   occasions.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a4903946ca)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Jake Deery e54acd4c30
Bug 42175: Fix Mojo under k.t.d
This patch fixes Mojo under k.t.d by providing CGI::Compile with an
absolute rather than relative path.

TO TEST:
== APPLY PATCH ==
a)  run reset_all
b)  run apachectl stop (if apache does not stop, may need to `sudo kill -9 apache2`)
c)  run /kohadevbox/koha/bin/opac prefork -m production -p -l http://*:8080 &
c)  run /kohadevbox/koha/bin/intranet prefork -m production -p -l http://*:8081 &
d)  confirm you can use k.t.d. as normal
== SIGN OFF ==

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5187bd52b9)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 7e4d3b646e
Bug 42182: Fix branch limitation on reports-home.tt
1- Create a StaffReportsHome HTML customization
2- Limit it by branch
3- Log into that branch and to to the reports home page
4- No HTML customization
5. APPLY PATCH
6. Try again, this time you should see the HTML customization.

Signed-off-by: Juliet Heltibridle <jheltibridle@rcplib.org>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f6addef698)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Maryse Simard 542786c484
Bug 41783: Encode query parameters for suggestions filtering
When filtering by bibliographic information in the sidebar of the
suggestions management page, the '%' contained in the query is
not encoded. This can lead to errors if the search terms can be
evaluated as an encoded character.

Test plan:
    1. Go to Acquisitions > Suggestions
    2. Create a suggestion with a title like "200 recipes"
    3. In "Filter by" > Bibliographic information, search for "200"
    4. No results are shown in the table
    5. Apply the patch
    6. Search again (step 3). The suggestion should appear in the list.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 61cffdc9f3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Roman Dolny bbbea91aa9
Bug 41938: Argument "" isn't numeric in numeric gt (>) ... warnings in circulation.tt
The warnings:

[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
 line 1072.
[WARN] Argument "" isn't numeric in numeric gt (>) at
/kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt
 line 1188.

appears in the plack-intranet-error.log.

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

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 656da5cb4b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Lucas Gass 3a6f0e55e1
Bug 41267: (follow-up) Check if exists
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9539b21089)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Nick Clemens 76e69eb566
Bug 41267: (follow-up) Add more clarifying text
Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 2c253faf2d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Nick Clemens c7ce11d9e0
Bug 41267: Add fill_other_biblio_holds_policy circulation rule
This patch adds a new rule for itemtypes to allow/prevent filling other holds on a bibliographic record
The rule will obey ReservesControlBranch for determining the rules

To test:
 1 - Apply patches
 2 - Setup/choose 2 item types in Administration->Item types
 3 - In Administration -> Circulation and fine rules scroll to the bottom
 4 - Set one item type to "Fill other holds on record" = 'Yes' and the other to 'No'
 5 - Place a next available hold on the record
 6 - Checkout the 'Yes' item type to the patron
 7 - Their hold should fill
 8 - Check in the items
 9 - Place a next available hold on the record
10 - Checkout the 'No' itemtype to the patron
11 - Their hold should not be filled
12 - Check in the item and confirm the hold
13 - Checkout the itme to the patron, the hold fills
     NOTE: While seemingly counter intuitive, the rule controls whether a hold NOT tied to this item will fill
     Confirming the hold adds an itemnumber to the hold. In most cases, these items will not be holdable, so won't trigger at checkin
14 - Set a rule for the patrons branch to No and set system preference ReservesControlBranch to 'Patrons library'
15 - repeat 5&6
16 - The hold should not fill
17 - Change reserves control branch to items home library
18 - checkin /checkout the yes item type
19 - The hold should fill

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 876869544f)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:15 +01:00
Kevin Carnes 36fcd33c60
Bug 21941: Fix GROUP BY in circ/reserveratios.pl
When using strict_sql_modes, the Hold ratios page causes an Incorrect
GROUP BY error and returns an Error 500.

This patch removes uncessary columns from the database query and adds
the biblio columns to the GROUP BY statement, so they can be selected.
Since it's already grouped by biblionumber, it should not cause any
additional rows to be created.

Test plan:
1. Make sure that strict_sql_modes is enabled in the koha-conf.xml
   file.
2. Place at least one hold on a book.
3. Go to Circulation and select Hold ratios.
4. Observe that you get an Error 500.
5. Apply patch.
6. Repeat step 3.
7. Observe that you can view the page.
8. If the table is empty, change the ratio to 1.
9. Sign off.

Sponsored-by: Lund University Library
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
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>
(cherry picked from commit ea4600476e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Paul Derscheid d0b6522041
Bug 15792: Throttle patron renewal links to prevent double-clicks
- Replace plain <a> renewal links in patron_messages.inc with the
  reusable throttled-button component introduced in Bug 40896
- Covers all four renewal links: warndeparture and expired states,
  in both circulation and patron detail contexts
- Include throttledButton.js in circulation.tt and moremember.tt
- Add persist mode and done icon state to throttled-button component
  so the button stays disabled on bfcache restore with a check icon
  instead of a misleading spinner

Test plan:
1) Create or update a patron category with an enrollment fee and an
   enrollment period in months (e.g. 24 months)
2) Create a patron of that type and write off any initial enrollment
   fee
3) Set the patron's dateexpiry to the past so the account is expired
4) Go to /cgi-bin/koha/circ/circulation.pl and scan the patron
5) Observe the "Renew" link in the expiration warning now shows as a
   small button with a rotate icon
6) Click "Renew" and confirm the button becomes disabled with a
   spinner, preventing a second click
7) Verify the patron is renewed correctly with only one enrollment
   fee charged and the correct expiry date
8) Press the browser back button to return via bfcache
9) Verify the button remains disabled and shows a check icon instead
   of the spinner, indicating the action was already completed
10) Repeat from the patron detail page (moremember.pl) to verify the
    same throttle and done-state behavior there
11) Test the warndeparture case by setting dateexpiry to a near-future
    date and confirming the same behavior

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>
(cherry picked from commit 3a6a79a607)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Owen Leonard 79bec7da95
Bug 42017: Fix content type of OPAC news RSS
This patch updates opac-news-rss.pl so that it outputs data with the
correct content type, text/xml.

To reproduce you must have at least one news item in your system. From
the OPAC main page, click the RSS feed link.
  - If you are using Firefox or Chrome you will see unstyled plain test
    on the screen.
You may or may not be able to see the problem if your
browser (e.g. Vivaldi) has a built-in RSS reader.

To test, apply the patch and restart services.

- In the OPAC, from the main page, click the RSS feed link at the bottom
  of the OPAC news list.
- You should see the XML view of the feed. This confirms that the
  browser is receiving the correct content type.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 96d2287a6a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize afa67532ea
Bug 41980: (follow-up) Fix Cypress test ambiguous field code search
Typing "CE" in the allow_fields dropdown now matches both
"CE - Unused" and "AY - Sequence number" (case-insensitive
match on "ce" in "Sequence"), causing the wrong option to be
selected. Use "CE - " to uniquely target the intended option.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit d35f76316d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize c5956d907c
Bug 41980: (Follow-up) Improve SIP2 field code descriptions
- Use sentence case for all dropdown descriptions
- Add 'Unused' descriptions for AR, AW, AX, BA, BB, BC, BJ, CE
- Move SIP field codes outside translatable strings to avoid
  untranslatable codes being sent to translators
- Update AE/AV/DA tooltip text: use 'Template Toolkit' (not
  'Template::Toolkit'), imperative form, and clearer object
  field descriptions

Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit ed3f0dcab2)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Martin Renvoize 8172fc738d
Bug 41980: Add more descriptive labels to SIP2 field codes
- Add field name labels to all entries in getSIPFields() used by the
  Allow/Hide fields dropdowns (e.g. "CV - Alert Type" instead of "CV")
  sourced from C4::SIP::Sip::Constants field identifier names
- Add tooltips to ae_field_template, av_field_template and
  da_field_template explaining what each SIP field represents and
  which Template::Toolkit objects are available
- Improve ct_always_send tooltip to explain CT is Destination Location
- Improve cv_send_00_on_success tooltip to explain CV alert type codes
- Improve cv_triggers_alert tooltip to clarify the two alert behaviours
- Improve cr_item_field tooltip to explain CR is Collection Code

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: John Vinke <jvinke@austinseminary.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 780ae2d3e3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
David Cook b6e4bccf39
Bug 42072: Improve message about deleting bib records
This patch clarifies which records will be deleted in
the batch item deletion (when no items remain).

Test plan:
0. Apply the patch
1. Go to "Reports" and click "Create from SQL"
2. Create a report with the following SQL:
select itemnumber from items limit 5
3. Run the report and then click "Batch operations with 5 visible records"
on the output page
4. Near the bottom of the screen note that there is a checkbox that
has a label reading "Delete bibliographic records if no items remain."
5. C'est tout!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 11de56769b)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 128a07749e
Bug 41759: The display of MARC 21 field 026 data (Fingerprint Identifier) is missing (both in intranet and OPAC)
Test plan
=========
1. Make field 026 active for Editor in MARC framework section (e.g. in default
   framework).
2. Edit any bibliographic record (with modified framework) adding 026 field data,
   e.g. 026 ## $a urdu esrt $b eses jecl $c 1790
3. Verify in Normal view (intranet) and in OPAC that you are unable to
   see the inserted data.
4. Apply the patch ; restart_all.
5. Verify in Normal view (intranet) and in OPAC that you are now able to
   see the fingerprint information from 026 field.

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 0dc06596e2)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 555c41ab48
Bug 41758: Add Fingerprint Identifier data to Elasticsearch index mappings
Libraries cataloguing older monographic resources request fingerprint indexing.

In MARC 21, it would be the content of field 026, in UNIMARC - 012.

Test plan
=========
1. Start up KTD with Elasticsearch: ktd --search-engine es8 up -d
2. Make field 026 active for Editor in MARC framework section (e.g. in default
   framework).
3. Edit any bibliographic record (with modified framework) adding 026 field data,
   e.g. 026 ## $a urdu esrt $b eses jecl $c 1790
4. Verify that you are unable to find the record searching with fingerprint data.
5. Apply the patch ; restart_all.
6. Reindex with: koha-elasticsearch --rebuild -r -d kohadev
7. Now you should be able to find the record searching with fingerprint data
   (performing a general search or prefixed with 'fingerprint-identifier:').

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 71af0f01d1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Owen Leonard 951426853c
Bug 42134: String displays incorrectly: words “notices” and “for” appear concatenated
This patch changes the way the notices template checks for the existence
of the TranslateNotices system preference in order to avoid a missing
space in the corresponding label.

To test you should have at least two languages enabled under the
StaffInterfaceLanguages system preference.

- Apply the patch and go to Administration -> System preferences..
- Locate the TranslateNotices preference and set it to "Allow"
- Go to Tools -> Notices and edit a notice.
- The "Modify notice" page should have tabs each of your enabled
  languages as well as "Default."
- Each tab should have a "Format" section. Expand it and check that the
  label for the checkbox at the bottom is correct, e.g. "Apply format
  settings to all notices for this language."
- Return to system preferences and set TranslateNotices to "Don't
  allow."
- Reload the notice edit screen and check the "Format" section. The
  label should now read "Apply format settings to all notices."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 4cdce0479c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Jacob O'Mara ef240151c9
DBRev 25.11.04.004
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Nick Clemens beed97eec9
Bug 28884: (QA follow-up) Add some missing pod
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit cc0e314f72)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek dfbba75c0f
Bug 28884: Add 'ElasticsearchEscapeCharacters' and 'OpacElasticsearchEscapeCharacters' system preferences
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 388bcec0ac)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00
Janusz Kaczmarek 5b60b8c15a
Bug 28884: Unit tests
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 3b1566b402)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:14 +01:00