Commit Graph

57293 Commits

Author SHA1 Message Date
Baptiste Wojtkowski ba67db305b
Update release notes for 24.11.11 release
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2025-12-04 15:26:13 +00:00
Baptiste Wojtkowski 9329a078dc
Increment version for 24.11.11 release
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2025-12-04 15:12:29 +00:00
David Cook c6de02ffe9
Bug 40524: [24.11.x] Update print format to use built-in formatter
This change updates the print format to use the built-in formatter
for operations like trim, strip HTML, strip newlines, and not
decoding entities.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/acqui/basket.pl?basketno=1
2. Click "add to basket"
3. Type "test" next to "From an existing record" and click "Submit"
4. On the "Gairm" row, click "Add order"
5. Fill in the required fields
6. In the "Internal note" put the following:
abc123
7. Click "Save"
8. In the Orders table, click "Export" and then "Print"
9. Note that the print page loads correctly, you can see the internal note,
and you cannot see lines for "Add internal note",
"Edit internal note", or "Add vendor note"

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
2025-12-04 15:07:16 +00:00
Kyle M Hall 7feed05a77
Bug 41100: EDI vendor account port numbers no longer editable
It seems that port numbers are stuck at 21. Editing them does not change the port number in the database.

Test Plan:
1) Check out Koha 25.05
2) Try to edit an EDI vendor account port
3) Note the change doesn't save
4) Apply this patch
5) Restart all the things!
6) Note you can edit the port again!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 03542dc217)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:38:35 +01:00
Andrew Fuerste Henry 495f9b9f07
Bug 40961: Default item and patron library values to blank
To test:
1 - load the Circulation Statistics wizard
2 - confirm Home library, Holding library, and Patron library default to selecting the logged-in branch
3 - apply patch, restart_all, reload page
4 - confirm Home library, Holding library, and Patron library default to a blank selection
5 - confirm queries with those blank selections are not limited by items.homebranch, items.holdingbranch, or borrowers.branchcode

Signed-off-by: Katherine Wolf <wolf@sarsf.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b2d3ec043c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 701bb15059)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:30:42 +01:00
phette23 535c4ab33a
Bug 40873: AV dropdowns in OPAC don't use lib_opac
To test (ktd):
- Sign into the admin side
- Go to Administration > Authorized Values
- Edit or add to SUGGEST_FORMAT such that one AV has a different lib_opac
- Sign into the public catalog
- Go to purchase suggestions /cgi-bin/koha/opac-suggestions.pl?op=add_form
- Note that the AV in the 'Item type' dropdown does not use your lib_opac text
- Apply the patch and refresh the page
- Now the AV uses the lib_opac text

Sponsored-By: California College of the Arts
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 ff461167fd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 91b362041e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:26:55 +01:00
Lucas Gass c252e49a05
Bug 40205: data-categorycode should always be set to ALL
To test:
1. Add at least one rule to the default-circulation-rules table that contains a patron category.
2. Now add a "Default checkout, hold and return policy" rule.
3. Inspect the "Unset" button:

<a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a>

4. APPLY PATCH and clear browser cache
5. Try again, this time you should be able to delete the rule.

Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d16b9f0311)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit fbee8b9f0e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:17:42 +01:00
Aleisha Amohia 3f9187478e
Bug 39985: Set items.onloan when recall adjusts checkout due date
This enhancement ensures the due date stored in items.onloan is changed when a recall causes a checkout due date to change.

To test:

1. Enable UseRecalls syspref and set corresponding circulation rules:
    - Recalls allowed
    - Recalls per record
    - On shelf recalls allowed - set to "If any unavailable"
    - Recall due date interval - set to 1
    - Recall pickup period
2. Check out an item to a patron (Patron A)
  2a. Make sure this patron has a primary email address set
  2b. Check the patron's messaging preferences - make sure this patron has the 'Email' checkbox checked for the 'Return recalled item' notice
3. Go to Tools -> Notices & slips and find the RETURN_RECALLED_ITEM notice. In the Email notice, change "[% checkout.date_due | $KohaDates %]" to "[% item.onloan | $KohaDates %]" and Save.
4. Log into the OPAC as another patron
5. Search for the item checked out in step 2, and place a recall on that item
6. Search for that item in the staff interface
=> Note that the item status says, "Checked out to <patron>: due <tomorrow>"
7. Create the following SQL report in the reports module, using the barcode of the item that was recalled:
SELECT onloan FROM items WHERE barcode='xxxxxxxxx'
8. Run the report
=> The onloan value is still set to the item's original due date, not the updated due date of tomorrow
9. Go to Patron A's account again and view their Notices tab. Click on the 'Notification to return a recalled item'
=> The original due date is used in the notice.
10. Apply the patch and restart services
11. Reset to run the tests again:
    - Check in the item, but do not confirm the recall in the pop-up
    - Go to the biblio detail page and cancel the recall
12. Repeat steps 2 to 5.
13. Run your report again (step 8)
=> The onloan value should now show the updated due date of tomorrow
14. View Patron A's latest 'Notification to return a recalled item' notice (step 9)
=> The updated due date should be used in the notice.
15. Confirm tests pass
    - t/db_dependent/Koha/Recalls.t

Sponsored-by: Auckland University of Technology
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 95f2639d64)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7c8dbf75ec)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:15:09 +01:00
Martin Renvoize e43cfd6c65
Bug 41229: Fix desk and register session persistence on library change
When changing library in circ/set-library.pl, desk and register values
were not being properly cleared from the session. This caused stale
desk/register data from the previous library to persist, resulting in:
- Incorrect cashup displays showing wrong library's register
- POS defaulting to registers from different libraries
- Session state inconsistent with visual UI

Three issues fixed:
1. Template: Changed register "None" option ID from "set-library-noregister"
   to "noregister" to match JavaScript expectations (consistent with desk handling)
2. Desk logic: Changed condition to use defined() and explicitly clear session
   when "No desk" is selected
3. Register logic: Added session clearing when "No register" is selected and
   fixed condition to handle empty initial state

Test plan:
1. Select Library A with Register 5
2. Change to Library B without selecting a register
3. Verify register is cleared from session (check POS page)
4. Repeat for desk selection
5. Verify explicit "-- None --" selection clears session values

Signed-off-by: Jason Robb <jrobb@sekls.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 92d6fcf2bd)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit bb90bd0bab)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:13:21 +01:00
Jonathan Druart 4f247dad7f
Bug 40760: Format 'Edit' link in item receive table as link
When receiving items in the acq module, the "Edit" link in the items
table for orders with items created when ordering is not recognizable
as link, but appears just formatted as normal text.

To test:
* Create a basket with items 'on order'
* Add an order line with 2+ items
* Close basket
* Receive shipment for the same vendor
* Click on "receive" link
* Verify the "Edit" in the items table on the left is formatted as a
  link

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 46bfbfee2d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 4b6bb36310)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:11:03 +01:00
Jonathan Druart 0a92eb8542
Bug 41298: Fix filtering items by in transit
The filtering condition was not correct, the presence of a line in
the transfer table is not enough to now if the item is in transit.
Here we filter reusing the same conditions as
Koha::Item::Transfer->in_transit

Test plan:
Have at least 2 items for a given bibliographic record
Transfer item 1
Transfer item 2
Receive/Fullfill the transfer for item 1

Item 1 is now available and item 2 is in transit

Go to items record and filter holdings table with status "In transit"
=> Only item 2 is displayed

Filter holdings table with status "Available"
=> Only item 1 is displayed

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0485296221)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 01d8c0f1ed)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:08:47 +01:00
Katrin Fischer 141258d889
Bug 41008: Fix bulkmarimport.pl -a -d
After bug 35659 that added the OAI harvester to Koha the -d switch
for deleting authorities before importing with bulkmarcimport.pl
was broken and resulted in a FK error.

Switching from truncate to DELETE FROM like we already did for items,
biblio etc. fixes the issue.

To test:
- Make sure you have some authorities in your database
- Export some into a file for importing
- Run bulkmarcimport -a -d --file <filename>
- Verify you get the a DB FK constraint error.
- Apply patch
- Repeat steps, verify the script now works as expected again
  * Existing authorities are deleted
  * File is imported

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 59d07337de)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eb6241644a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 15:03:44 +01:00
Martin Renvoize 36bfebe856
Bug 38072: Fix regression in modal_printer
This patch updates the JS for the modal printer to make it more
reliable.

I found that in recent versions of chrome the print dialog failed to
open and instead you were just faced with a flash of white before the
new tab autoclosed and no print takes place.

Test plan
1) Enable cash registers and point of sale preferences
2) Add a debit type and mark it as 'Can be sold'
3) Add a cash register
4) Use 'Point of sale' to sell one of the above item for cash against
   the register you just created.
5) Navigate to the register and 'cashup'
6) Click the 'summary' link to display a modal
7) Use the 'Print' option in the modal and confirm you face a print
   dialog and can print
8) The print tab should be closed and you should be back to Koha

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

Bug 38072: Ensure the printing tab closes

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

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Squashed and tidied.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit af31453c63)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit dd68cc79e6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 14:59:59 +01:00
David Cook b82c0ddd5f
Bug 38516: Use PDF template copy for exporting PDFs
Due to a bug in PDF::API2 or related libraries,
you cannot export a PDF if you do not have write
permission on the PDF template. We bypass this
problem by taking a string copy of the PDF template
and working on that instead.

Test plan:
0. DO NOT APPLY THE PATCH YET
1. chmod 444 /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/pdf/*.pdf
2. Create a basket with a vendor
3. Add an order to the basket
4. Close basket (and attach the basket to a new basket group with the same name)
5. Go to "Closed" tab and click "Export as PDF"
6. Note that you get an error when you try to open it in Adobe or some other PDF program

7. Apply the patch and restart koha (e.g. koha-plack --restart kohadev)

8. Try to "Export as PDF" again
9. Note that this time there is no warning and your PDF opens just fine
10. Repeat the "Export as PDF" process for every option of the
system preference "OrderPdfFormat". Every option should work
without errors.
11. Celebrate!

Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a6ba625592)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 020e862d32)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 14:54:53 +01:00
Tomás Cohen Arazi b3a050fb20
Bug 41032: Fix Open Fifth missing in plugin repos config
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
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>
(cherry picked from commit cee02bbf3b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 420fb7148a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 14:35:24 +01:00
Lucas Gass 33ffba1f56
Bug 41149: Replace replaceWith() with empty() and append()
To test:

1. Set AllowRenewalOnHoldOverride to 'Dont allow'
2. Set  OverduesBlockRenewing to "block renewing"
3. Checkout an item and mark it as overdue.
4. Place a hold on that item to someone else
5. Now go look at the issues table for that patron/item
6. Check "Override renewal restrictions:"
7. Now a checkbox should appear in the "Renew" column, check it.
8. Click "Renew selected items"
9. After the "Renew failed: on hold" appears the spinning icon should
   disappear.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d51dc1fc69)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9fb160eca8)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 14:33:42 +01:00
Marcel de Rooy b3d0db6e7b
Bug 41094: Fix search_anonymize_candidates, locked_account
We should not allow anonymizing patrons with failed login attempts
when the pref FailedLoginAttempts has not been set.

Test plan:
Run the test again from the previous patch. This should pass now.
Choose a patron with a positive value (say 55) in borrowers.login_attempts
or modify one. (NOTE: This patron will be anonymized in the test plan.)
Empty pref value for FailedLoginAttempts.
Set PatronAnonymizeDelay to 1.
Fill dateexpiry for this patron to yesterday.
Run cleanupdatabase.pl -confirm -v and check if the patron was NOT anonymized.
* Anonymized 0 patrons

Now set FailedLoginAttempts to a value (say 55) so that the patron is
considered as locked. (This unrealistic value is for testing only.)
MAKE SURE that you will not be anonymizing more patrons than you like
in the next step! (Set login_attempts to value < 55 for all other patrons.)
Run cleanupdatabase.pl -confirm -v again and check if the patron was anonymized.
* Anonymized 1 patrons
Restore the changed pref values.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
(cherry picked from commit 291c2f103d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 2fb7dab4a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:41:03 +01:00
Marcel de Rooy 56cd6fd0f0
Bug 41094: Improve test of search_anonymize_candidates/account_locked
Test plan:
Run the test without applying the follow-up patch.
The test should fail. This shows that we need the fix and will help
avoid future regressions.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
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>
(cherry picked from commit f4ff248b5c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 9a2e2c3101)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:37:46 +01:00
Lucas Gass d7c98357c0
Bug 41212: Sort debit_types for manual invoice by description
To test:
1. Add some debit types that can be manually invoiced.
2. Go to members/maninvoice.pl?borrowernumber=X where X is your
   borrowernumber
3. In the type dropdown see that the entries are sorted by code not
   description.
4. APPLY patch and restart_all
5. Try again, now it should sort by code.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 644e4af1f6)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a5c8ee1631)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:34:49 +01:00
Lucas Gass b93dafbb9e
Bug 40843: Sort patron attributes by description
To test:

1/ Have several borrower attributes set up so you can see how they sort
2/ Go to Tools >  Batch patron modification
3/ Notice the "Patron attribute:: dropdown near the bottom
4/ It is sorted by the attribute code, not the description.
5/ APPLY PATCH and restart_all
6/ Try again, it should sort by the description

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 29f9518785)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c63b49d8d0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:31:14 +01:00
Caroline Cyr La Rose 829d8292b6
Bug 40664: Serial subscription input missing "Required" labels
This patch adds missing "Required" labels next to two mandatory fields
in the second page of the new serial subscription form.

To test:
1. Go to Serials
2. Click 'New subscription'
3. Enter a biblionumber in the 'Record' field (e.g. 230)
4. Click 'Next'
5. (Click 'OK' to confirm that you are not adding a vendor)
--> On the page 'Add a new subscription (2/2)' the fields 'Frequency' and 'Subscription start date' are red to indicate that they are mandatory, but there is no 'Required' note next to them.
6. Apply patch and refresh the page
--> It should say 'Required' next to all the mandatory fields (in red)

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4bb7a1371c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f90a00164b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:27:00 +01:00
Jan Kissig 9b96dc0bb6
Bug 40836: (QA follow-up) Reduce params
Reduce params given to process method.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac7861bbe2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 69657d03f2)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:24:42 +01:00
Laura_Escamilla e5033e0c60
Bug 40836: OPAC Type column should show local debit/credit type descriptions
To test:
1. create a credit type that can be applied manually
2. create a debit type that can be applied manually
3. apply both a credit and debit to your patron (make sure auto-reconcile is off)
4. look at your patron's account in the staff interface, see values in the "account type" column
5. look at your patron's account in the OPAC, see the "Type" column is blank
6. Apply the patch - restart_all
7. Refresh the patron’s account in the OPAC — clear browser cache if necessary. The Type columns should now be populated.

Signed-off-by: CJ Lynce <cj.lynce@westlakelibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a399374a2d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 66dde68869)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:23:39 +01:00
John Doe 2b724766f8
Bug 41039: Add cypress tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3f59557d2a)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit d572b6f422)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:07:09 +01:00
Kyle M Hall 2a6485f8d1
Bug 41039: Prevent patron search button from being spammed triggering multiple api requests
Every click of the "Search" button on members/members-home.pl or other area that utilizes patrons searching,
will trigger another patron search api request. This button should be disabled until the first searches results are displayed.

To demonstrate, open the network tab of the developer console on your web browser. Note each click if the button show another patron search api request.

Test Plan:
1) Browse to members-home.pl
2) Open the network tab of the developer console on your web browser
3) Double click the Search button
4) Note the two api requests in the network tab
5) Apply this patch
6) Reload the page
7) Double click the Search button
8) Note only one api request is made

If your results come back too fast, you may perform an initial search,
then change the number of results from the default 20 to "All" to
create a search that will take longer.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7db2818bf0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e203ba8dcc)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 11:06:09 +01:00
Jonathan Druart c7d51c9423
Bug 38475: Skip some tests in InfiniteScrollSelect_spec
They are failing randomly for too long.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ef51ce1bd4)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6733943bd3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 10:53:09 +01:00
Pedro Amorim 1537dc71a8
Bug 41257: Remove 'btn-sm' CSS class
It may have made sense in the past but I don't think it does anymore. It adds an odd bottom spacing to the button

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e59ad2eb48)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 445a942cf0)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 10:51:35 +01:00
Pedro Amorim 32c5f14fc9
Bug 41257: Fix wording condition check
To reproduce:
1) Enable ILLModule
2) Visit ILL requests:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl
3) Where 'List requests' show, it should show 'Refresh'.
4) Apply patches, refresh, notice it now shows 'Refresh'.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c60be45364)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a334a1554c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 10:51:09 +01:00
Paul Derscheid 235d8ed495
Bug 35830: DBRev 24.11.10.002
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7d8199b1a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 10:36:24 +01:00
Brendan Lawlor 4376e369b2
Bug 35830: Add merge_borrowers subpermission
Merging patrons only required edit_borrowers permission
but would result in a patron deletion.

This patch requires a new merge_borrowers subpermission

To test:
1. Give a patron the following permissions
    catalogue, edit_borrowers, list_borrowers
2. Log into the staff interface as the patron
3. Do a patron search and select 2 patrons
4. Click merge patron - success - a patron got deleted
5. Apply patch, updatedatabase and restart_all
6. Repeat steps 3 and 4 - you can't
7. Add the new permission for merge_borrowers
8. Repeat steps 3 and 4 - now you can
9. prove t/Koha/Auth/Patrons.t

Sponsored-by: CLAMS
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>
(cherry picked from commit 5ce9d5af4e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 576b80bb1d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-04 10:34:54 +01:00
Fridolin Somers 8f4d2803be
Bug 41167: [24.11.x] vendors not yet in VueJS
See https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38010
2025-12-02 12:12:03 +01:00
Paul Derscheid b3ceaf8c7b
Bug 41167: (RMaint follow-up) Backport adaptation to satisfy xt/find-license-problems.t
Should be reverted as soon as Bug 40163 is backported.

Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 433e964526)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 12:06:29 +01:00
Marcel de Rooy 2ecd3a994a
Bug 41167: Add missing line to etx/koha-httpd.conf
Test plan:
Run xt/check_apache_conf.t again. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5c0fb862ba)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit afe93c21a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 12:06:28 +01:00
Jonathan Druart 0583121b36
Bug 41167: Add test to compare both apache conf
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] chmod 755, shebang, remove Data::Printer, enable NoWarnings
       one regex delimiter; replaced a grep by a map
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1572ea7578)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8416af851b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 12:06:28 +01:00
Vivek Kumar 60ffc1a700
Bug 41167: Fix missing rewrite rules in koha-httpd.conf
This patch adds missing RewriteRules for ERM, Preservation and Acquisition modules in koha-httpd.conf to restore staff client functionality.

Test plan:
1. Apply patch
2. Restart Apache
3. Access acquisitions and ERM pages
4. Confirm functionality restored

Signed-off-by: Vivek Kumar <vivek.kumar@bestbookbuddies.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>

Bug 41167: (follow-up) Correct rewrite rules in koha-httpd.conf

This follow-up patch fixes issues from the initial patch for Bug 41167:
- Adds missing asterisks (*) in rewrite rule patterns
- Removes erroneous RewriteRules from the OPAC virtualhost
- Ensures all ERM, Preservation, and Acquisition rewrite rules are correctly placed under the intranet virtualhost

Test plan:
1. Apply patch
2. Restart Apache
3. Access ERM, Preservation, and Acquisitions modules
4. Confirm pages load correctly without 404 or routing errors

Signed-off-by: Vivek Kumar <vivek.kumar@bestbookbuddies.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 47384fb03f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit a483975974)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 12:06:27 +01:00
Lari Taskula 15d38d2104
Bug 41104: Remove -sameSite from checkauth() response headers
To test:
1. prove t/db_dependent/Auth.t
2. Observe success

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit dbf812869d)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit c56b44ec98)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 12:01:56 +01:00
lawrenceol-clams a2f8edf163
Bug 41207: Fix spelling of edit_items suggestion text in edit_catalog subpermission
This patch fixes the spelling of edit_items in the suggestion text in
an edit_catalog subpermission.

Test plan:
0. Go to a patron record
1. Click on more -> set permissions
2. Scroll down and expand the Edit Catalog
3. Notice the line says edit_item is required but the permission needed
   is edit_items
4. Apply patch
5. Repeat steps 0-3
6. Confirm the suggestion text in the edit_catalog subpermission now
   reads edit_items

Sponsored-by: CLAMS
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e3f2ccf2c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 09be4fb7f4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:52:59 +01:00
Nick Clemens 5c4970a830
Bug 41205: Skip undef records in Z39 response
This patch simply skips undefined records - this prevents the error
though it doesn't explain why we get undef records here and a Z39 search
from standard cataloging just returns nothing.

This prevents a breakage of the search.

To test:
1 - Have LOC defined as a Z39 Source (standard in KTD)
2 - Open the advanced editor
3 - Search for ISBN 9780520401129
4 - Search explodes, logs like:
     AH01215: stderr from /kohadevbox/koha/svc/cataloguing/metasearch: Can't call method "raw" on an undefined value at /kohadevbox/koha/Koha/MetaSearcher.pm line 267., referer: http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl
    AH01215: stderr from /kohadevbox/koha/svc/cataloguing/metasearch: Magic number checking on storable file failed at /usr/lib/x86_64-linux-gnu/perl/5.36/Storable.pm line 443, at /kohadevbox/koha/Koha/MetaSearcher.pm line 144., referer: http://localhost:8081/cgi-bin/koha/cataloguing/editor.pl
5 - Must refresh the page to clear the bad error message
6 - Apply patch
7 - Repeat search - no results, LOC says 'Permanent system error'
8 - You can close the results and do a new search

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7185201e93)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 5c0c4bcb6a)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:48:37 +01:00
Fridolin Somers 8f0f7fbf6a
Bug 29908: Remove warning when empty ClaimReturnedWarningThreshold in patron_messages.inc
System preference ClaimReturnedWarningThreshold manages the display of a patron message in case of too many claims.
But this preference may be empty. It is created empty in installer/data/mysql/mandatory/sysprefs.sql.

This generates a warning :
Argument "" isn't numeric in numeric gt (>) at /kohadevbox/koha/koha-tmpl/intranet-tmpl/prog/en/includes/patron_messages.inc line 128.

Test plan :
1) Set systempreference 'ClaimReturnedWarningThreshold' empty
2) Go to a patron details page
3) Check there is no warning in logs
4) Go to a patron check-out page
5) Check there is no warning in logs
6) Set systempreference 'ClaimReturnedWarningThreshold' with an integer (ie 5)
Repeat from 2)

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27230e64ad)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 86f3a33a2c)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:33:09 +01:00
Lari Taskula cd8dc85ae9
Bug 41044: Fix warning
To test:
1. prove t/db_dependent/Koha/Item.t
2. Observe success

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d77c826c8c)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit eec7e9ea48)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:27:50 +01:00
Lari Taskula 99a51b428d
Bug 41044: Add a failing test
To test:
1. prove t/db_dependent/Koha/Item.t
2. Observe failing test

Subtest: test empty string warning
        1..1
        not ok 1 - No warnings were produced
           Failed test 'No warnings were produced'
           at t/db_dependent/Koha/Item.t line 3656.
         found warning: Argument "" isn't numeric in addition (+) at /usr/local/lib/x86_64-linux-gnu/perl/5.34.0/DateTime/Duration.pm line 70.
         didn't expect to find a warning
         Looks like you failed 1 test of 1.
    not ok 9 - test empty string warning
       Failed test 'test empty string warning'
       at t/db_dependent/Koha/Item.t line 3657.
     Looks like you failed 1 test of 9.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 120ef099fc)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 17b379984b)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:27:49 +01:00
Marcel de Rooy e93bb2958d
Bug 40559: Fix noisy warning in MARCdetail
Rebased for 25.06.
Resolves:
    Use of uninitialized value in string eq at /usr/share/koha/catalogue/MARCdetail.pl line 203.

Test plan:
Make sure that there is a combination of framework/field/subfield having
an entry in marc_subfield_structure where kohafield is NULL.
To force this for default fw on 020$q:
    update marc_subfield_structure
    set kohafield=NULL
    where tagfield='020' and tagsubfield='q' and frameworkcode='';
Pick a biblio in this framework having that field/subfield. Or create
a 020 with $q filled. Hit catalogue/MARCdetail now.
Without this patch, it triggers the warn. With this patch, it does not.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40d1cdeeb1)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 96c574853d)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:24:04 +01:00
Jonathan Druart e9e44a39e1
Bug 38080: Fix order of columns in opac's holdings tables
The order of the columns in the yaml file must match the order of the
columns in the template file.

Test plan:
Confirm that, with bug 30633 applied, you can pick "shelving location"
as the default sort order and that the items are correctly sorted by
shelving location.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9f42c5fe28)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 78ee3caa6f)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 11:12:34 +01:00
Slava Shishkin 12a6dda17a
Bug 40720: Misleading title attribute "Remove all items" in Select2 fields
This patch updates our Select2 initialization script to update the
strings used as title attributes on the "X" control which appears in a
Select2 dropdown when you've made a selection.

The updated text reads "Clear selections" in order to eliminate the
ambiguity of the word "items."

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

- Go to Catalog -> Item search.
- Make one or more selections in any of the Select2 dropdowns (e.g. Home
  library, current library, item type, etc.).
- An "X" should appear at the end of the field after you've made one or
  more selections.
- Hover your mouse over the "X." The title which appears should read
  "Clear selections."

Sponsored-by: Athens County Public Libraries

Signed-off-by: Slava Shishkin <slavashishkin@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a8dd0bc13f)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 98ec1e1134)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:54:42 +01:00
Jonathan Druart dd8b69b7d4
Bug 40988: Remove pagination for funds on acqui home
As well as the fund list view (admin/aqbudgets.pl)

Signed-off-by: Sarah Berry <sberry@pascolibraries.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7dac6055b2)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 7076be71db)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:52:15 +01:00
Caroline Cyr La Rose a50e1a5395
Bug 41092: Some system preferences have target='blank' instead of target='_blank'
This patch changes target='blank' to target='_blank' in system
preferences.

To test:
1. Apply the patch
2. Check the following system preferences, click on the links,
   make sure every click opens in a new tab
   - UniqueItemFields
   - PatronSelfModificationMandatoryField
   - PatronSelfRegistrationBorrowerMandatoryField
   - PatronSelfRegistrationBorrowerUnwantedField
   - PatronSelfModificationBorrowerUnwantedField
   - EmailFieldPrecedence
   - BorrowerMandatoryField
   - BorrowerUnwantedField
   - PatronQuickAddFields
   - PatronDuplicateMatchingAddFields

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4d1a556c15)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 8555a7a78e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:32:15 +01:00
Fridolin Somers dbe9bb170c
Bug 40903: Fix OPAC advanced search applies a limit of the logged-in library by default
This is caused by Bug 36742. It exists in main but starts in 24.11.

The OPAC advanced search now automatically applies a limit to the 'Location and availability' section using the patron's logged in library, even if there are multiple libraries in the system.
This feature must be depending on system preference 'SearchMyLibraryFirst'.

1) Set system preference 'SearchMyLibraryFirst' to 'Don't limit'
2) Go to OPAC
3) Authenticate with a user
4) Go to advanced search
5) Check there is no library selected in 'Location and availability'
6) Select a library and submit
7) Clik on 'Return to the last advanced search'
8) Check the library is selected in 'Location and availability'
9) Set system preference 'SearchMyLibraryFirst' to 'Limit'
10) Go to OPAC
11) Authenticate with a user
12) Go to advanced search
13) Check library of patron selected in 'Location and availability'

Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d14619158e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e4026f08a1)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:29:42 +01:00
Marcel de Rooy 0df2d94dfa
Bug 41024: Unify spelling of BorrowersLog, keep plural form
The singular form is wrong and only exists in textual context.
This is a result of git grep | xargs sed.

Test plan:
Read the patch.
git grep BorrowerLog

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 4a267d0e9b)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f59d8c46e3)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:28:33 +01:00
Marcel de Rooy 2a2d7eb0d2
Bug 41123: Remove useless dbh call in Koha::Patron
Test plan:
Read the patch.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1a2d1774f0)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit e82a85a105)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:22:58 +01:00
Jonathan Druart bc7df6e6f1
Bug 40845: Remove hardcoded Koha version from t/Koha/Manual.t
Test plan:
Update the version in DB:
> update systempreferences set value="25.1100000" where variable="version";
restart_all
prove t/Koha/Manual.t

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Aleisha Amohia <aleisha@catalyst.net.nz>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8358957f57)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit f298d75280)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-12-02 10:20:07 +01:00