Commit Graph

60066 Commits

Author SHA1 Message Date
Lari Taskula 6de1190aa3
Bug 40933: Add the ability to send custom SMS messages to a patron
To test:
1. Make sure SMSSendDriver system preference is enabled
2. In staff client, navigate to patron details of any patron
3. From the members menu toolbar, click "Add Message"
4. Under "Add a message for", select "SMS - sms number of patron"
5. Write a custom message
6. Click "Save"
7. Navigate to patron's Notices tab
8. Observe a new notice titled "SMS added by a librarian"
9. Click it
10. Observe the content you wrote in step 5
11. Repeat steps 2-4
12. Select predefined patron notice. If you don't have one,
navigate to Tools > Notices and slips > New notice > Patrons (custom message)
and add content under sms delivery option
13. Repeat steps 6-7
14. Observe your custom message in the notices table
15. Observe your custom message content when you click the notice

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Charlie Arthur <carthur@slolibrary.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bee9d8da78)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 13:23:08 +00:00
Jacob O'Mara d31b755795
Bug 41287: DBRev 25.11.02.003
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 13:23:07 +00:00
Martin Renvoize 823426528a
Bug 41287: (QA follow-up) Fix HTML syntax and improve logic consistency
This patch addresses two issues found in QA review:

1. Fixed HTML syntax error in i18n_l10n.pref where closing anchor tag
   was incorrectly written as <a> instead of </a>

2. Changed C4/Search.pm to use elsif instead of separate if statement
   for FacetOrder checking, matching the logic structure used in
   Elasticsearch implementation and preventing potential double-execution

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bdf5dc788c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 13:23:07 +00:00
David Nind 378b8d6827
Bug 41287: (follow-up) Update system preference descriptions
Updated FacetSortingLocale description:
- added link to FacetOrder
- name of option for Facetorder matches option in dropdown list

Updated FacetOrder:
- changed preference to system preference

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 832f93f891)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 13:23:07 +00:00
Nick Clemens 5999000ddf
Bug 41287: Add option to use simple Stringwise sorting for facets
This patch restores the previous perl sorting to restore speed. For English language libraries
this will be correct in most instances, and is much more performant.

To test:
1 - Apply patch, update database
2 - Perform some searches, note ordering of facets
3 - Update system preference 'FacetOrder' to 'simple alphabetical'
4 - Peform some searches, note ordering of facets, should be correct unless you have unicode characters
5 - Sign off

NOTE: Benchmarks attached as a comment, you can also enable NYTProf and view results for yourself:
https://wiki.koha-community.org/wiki/Profiling_with_Devel::NYTProf#NYTProf_with_Plack
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 66825efa06)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 13:23:07 +00:00
Nick Clemens 9158d936c9
Bug 40905: (QA follow-up) Apply same fix for exceptions table
This table also has a show past holidays button, we need the same fix

To test:
1 - Spam holidays into both tables
    You can run the SQL commands below a few times each
INSERT INTO special_holidays (branchcode, day, month, year,isexception, title,description) VALUES ('CPL',FLOOR(RAND() * 28) + 1,FLOOR(RAND() * 12) + 1,FLOOR(RAND() * 6) + 2020,0,LEFT(UUID(),8),UUID());

INSERT INTO special_holidays (branchcode, day, month, year,isexception, title,description) VALUES ('CPL',FLOOR(RAND() * 28) + 1,FLOOR(RAND() * 12) + 1,FLOOR(RAND() * 6) + 2020,1,LEFT(UUID(),8),UUID());

2 - Go to Tools->Calendar
3 - Click 'Show past holidays' for exceptions and unique holidays
4 - Confirm checking and unchecking work on both tables

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 83e553dd9e)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:45:40 +00:00
Slava Shishkin 55e78b1f77
Bug 40905: Fix "Show past entries" checkbox in unique holidays
Test plan:
1. Go to Tools → Calendar.
2. Select a branch with past unique holidays.
   If you don't have past closed days: Create a new holiday in a past
   month or so.
3. In the Unique holidays section, enable "Show past entries".
4. Past entries are not displayed.
5. Apply patch:
6. Repeat the steps above.
7. Past entries are displayed immediately.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 27b89b20b8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:45:39 +00:00
Martin Renvoize d4ae3e5c48
Bug 40769: Display hold fees in staff client when placing holds
This patch adds hold fee information display in the staff client's hold
request interface, bringing it to feature parity with the OPAC.

The OPAC already shows patrons the fee that will be charged for placing
a hold, but the staff client did not display this information when staff
place holds on behalf of patrons. This creates a transparency gap where
staff cannot inform patrons about potential charges.

Changes:
- Import GetReserveFee function in reserve/request.pl
- Calculate reserve charges for each biblio record
- Display fee information in both single and multi-hold interfaces
- Show appropriate messaging based on HoldFeeMode system preference
- Use consistent formatting with currency display

Test Plan:
1. Set up hold fees:
   - Go to Administration > Patron categories
   - Edit a patron category and set a "Hold fee" (e.g., 1.00)
   - Ensure HoldFeeMode system preference is set (default: "only if all
     items are checked out and the record has at least one")

2. Test single hold with fee display:
   - Go to a bibliographic record
   - Click "Place hold"
   - Find a patron from the category with hold fees configured
   - Verify fee information displays after the title:
     * Shows "Note: [Patron Name] will be charged a hold fee of $1.00
       for placing this hold" when the HoldFeeMode is set to "any time
       a hold is placed"
     * Or "...when they collect this item" if HoldFeeMode is set to "any
       time a hold is collected"

3. Test multi-hold with fee display:
   - Ensure 'DisplayMultiPlaceHold' preference is set to 'Enable'
   - Search the catalog
   - On the search results page, select multiple biblios and click
     'Place hold'
   - Search for the same patron
   - In the confirmation table, verify each record shows:
     * "Hold fee: $1.00 (charged when placed)" in the Information column
     * Or "(charged when collected)" based on HoldFeeMode

4. Test no fee display:
   - Repeat tests with a patron from a category with no hold fee
   - Verify no fee information is displayed

5. Test different HoldFeeMode settings:
   - Change HoldFeeMode system preference to 'any_time_is_collected'
   - Verify messaging changes to "when they collect this item"
   - Test with 'not_always' mode and verify fee only shows when appropriate

6. Verify existing functionality:
   - Ensure hold placement still works normally
   - Verify all other hold interface elements remain unchanged
   - Test that holds are properly placed with or without fees

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 b322e3e959)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:45:08 +00:00
Pedro Amorim d938714299
Bug 41512: (OPAC) Additional fix
This is needed or else the OPAC still throws the 'malformed query string' mentioned on the original test plan.
This is because the fix from bug 40865 was only applied to intra datatables.js not the OPAC datatables.

I don't know why this fixes it for the OPAC, but it does.

Joubu, thoughts?

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fd87ee6edf)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:44:28 +00:00
Pedro Amorim fde418abce
Bug 41512: Fix ILLCheckAvailability
1) Install the unpaywall plugin:
  https://github.com/openfifth/koha-plugin-ill-avail-unpaywall/releases/tag/1.0.2
2) Configure an email address on the plugin configuration (I believe any email address should work):
<staff_url>/cgi-bin/koha/plugins/run.pl?class=Koha%3A%3APlugin%3A%3ACom%3A%3APTFSEurope%3A%3AAvailabilityUnpaywall&method=configure
3) Enable ILLModule and ILLCheckAvailability sys prefs
4) Create a new ILL request, visit:
  <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
5) Pick type: journal article and enter the DOI: 10.1002/bjs.1800621024
6) Enter a cardnumber e.g. '42' for koha user and any library.
7) Notice the availability screen never renders, a console error is logged on the browser.
8) Apply patch. Refresh. Repeat.

This appears to have stopped working after bug 26553. Using git bisect, after bug 26553 (cc09868152), this started returning a 'bad request: malformed query string' because query params were being sent to the plugin API route (which doesn't consider them). Bug 40865 then fixed the bad request error, but resulted in the console error we see now, which is fixed by this patch.
ajax.dataSrc appears to now be returning an additional level of 'data' due to datatables upgrade (?), this patch changes the dataSrc override to be more in line with the example doc at https://datatables.net/reference/option/ajax.dataSrc

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 20d20ba9a9)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:44:27 +00:00
Aya Khallaf 4711b6cc57
Bug 40703: Replaced data-toggle with data-bs-toggle
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bc2d8dc1c3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:43:19 +00:00
Pedro Amorim 6fcd7937f3
Bug 41478: Refactor: Readability + Never nester
1) Install the following dummy backend plugin:
https://github.com/openfifth/koha-ill-backend-plugin/releases/tag/v2.0.9
2) Sys prefs preparation: Enable ILLModule, ILLOpacUnauthenticatedRequest and check PluginBackend on AutoILLBackendPriority
3) Logout, create a new Unauthenticated ILL request on the OPAC, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=create&backend=Standard
4) Fill in the mandatory top fields (first name, last name, email address and library)
5) Pick 'Book' for type and enter 'green' in title. This will cause the dummy plugin to be available in the AutoILL logic.
6) At the bottom of the form, on the "Verification" captcha, purposely input a wrong captcha e.g. '123'
7) Click 'Create'. Notice an odd looking form is presented, this is the dummy backend form, but it should present the 'Standard' form when using AutoILLBackendPriority as that was also the form we were presented with originally.
This happens because currently it's the backend that delegates back to Koha what template to render. When using AutoILLBackendPriority, however, Koha should handle this template delegation instead and present the Standard form.
8) Apply patches. Repeat test plan. Notice that now on step 7 you get the correct form, and error message (coming from Standard, as expected when using AutoILLBackendPriority).
9) Input the correct captcha this time
10) Confirm the created request landed in the PluginBackend backend.

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 6473a06916)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:42:03 +00:00
Pedro Amorim 14426d2462
Bug 41478: Render Standard form on OPAC if failed_captcha and AutoILLBackendPriority
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 53a78c501d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:42:00 +00:00
Pedro Amorim af5c419802
Bug 41465: Fix display of 'type' for unauthenticated ILL request
'request' is unblessed in this context. get_type doesnt exist/work.

Test plan:
1) Enable ILLModule and ILLOpacUnauthenticatedRequest
2) Logout, place an OPAC unauthenticated ILL request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?backend=Standard&op=add_form
3) Input all mandatory fields. Click 'Create'.
4) Notice 'Request type' shows as 'N/A'. This will always be the case regardless of type you pick.
5) Apply patch. Repeat. Notice 'Request type' now shows as expected.

Signed-off-by: Richard Bridgen <richard.bridgen@nhs.net>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 51c718b184)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:41:18 +00:00
Paul Derscheid d3de9ea135
Bug 41035: remove invalid path component 'item'
To test:
1. Create a record as a collection with leader 007 set to c
2. Add some items on the same branch to the bundle
3. Check one item in
4. Observe that you get a 404 error and the item is not removed from
   the bundle
5. Apply the patch
6. Repeat step 3
7. Observe that the item is correctly removed (unlinked) from the
   bundle
8. Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b52f621dc)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-16 10:41:03 +00:00
Jacob O'Mara 3583b7919d
Bug 23308: DBRev 25.11.02.002
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 2ad7a55388
Bug 28308: DBrev
To remove the unnecessary entries from the DB

Signed-off-by: Ayoub Glizi-Vicioso <ayoub.glizi-vicioso@inLibro.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0a42444fee)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart a96fea3f43
Bug 28308: JS changes
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac724b8f06)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 167758957d
Bug 28308: Remove 0 from "days in advance" for "Advance notice"
0 days in advance means that the notice should not be sent.

This patch contains the pl/pm changes: we set to null if 0 is passed,
and do not insert a row in borrower_message_transport_preferences

Test plan:
0. Do not apply the patches
1. Create some entries with email and days in advance = 0
2. Create some entries with email and days in advance > 0
3. Apply the patches
4. Run the updatedatabase script
=> The rows in borrower_message_transport_preferences have been removed
for days in advance = 0
5. Edit some messaging preferences
=> 0 has been replace with a blank entry
=> checkboxes are disabled when blank is selected
6. Save
=> No new entry in borrower_message_transport_preferences is blank is
selected
7. advance_notices.pl still works correctly

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d2ad74b63c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Emmi Takkinen 671c913b22
Bug 29768: Do not hide guarantor name from memberentry.pl
Syspref "hidepatronname" currently hides guarantors
name on memberentry.pl. This is inconsistent since name isn't hidden e.g. on moremember.pl and staff
can already see patrons other personal information
during edit.

To test:
1) Disable syspref "hidepatronname"
2) Edit guarantee patrons information
=> Field "Guarantor" only shows guarantors cardnumber (or
is empty if guarantor has no cardnumber)
3) Apply patch
=> Guarantors name is now displayed (as a hyperlink)

Also confirm  hidepatronname still works as expected
on other pages (holds table, items detail page etc.).

Sponsored-by: Koha-Suomi Oy
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 4e6e7bd914)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Jonathan Druart 057d812edc
Bug 36136: Make sure 'to' dates are instantiated with the 'from' dates as minimum
To test you should check the behavior of forms which have sets of "from"
and "to" dates. It shouldn't be possible to select a "to" date which is
before the "from" date. For example:

- Overdues report
- Invoice search

In some cases we need to check that the fields work correctly when the
"from" date is already filled:

- Editing vendor issues
- Editing a budget
- Duplicating a subscription

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Olli Kautonen <bhm503@myy.haaga-helia.fi>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d94e2b26b6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:06 +00:00
Owen Leonard 2f9abcc757
Bug 32288: Capitalization: RDA Carrier, etc.
This patch corrects the capitalization of the phrases "RDA carrier,"
"RDA content," and "RDA media," found in several UNIMARC cataloging
plugins.

To test you could edit subfields in a MARC framework to activate each
affected plugin, but I think the change is simple enough to be checked
by examining the patch.

Sponsored-by: Athens County Public Libraries
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 ead9dd4cac)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Owen Leonard 283d428e7f
Bug 41586: Fix spacing problem in display of patron names
This patch updates patron-title.inc which generates the output of patron
names throughout Koha. Some whitespace is added to the display of
borrowers.othernames and spaces removed from the maybe_span WRAPPER.

To test, apply the patch and create or edit a patron in the staff
client.

- Add a value to all the name fields: Surname, first name, preferred
  name, middle name, and other name.
- Save the patron and check the display of their name on the patron
  detail page. The name in the page heading and sidebar should have
  correct spacing.
- Place a hold for that patron to be picked up at the logged-in library.
- Go to Circulation -> Holds to pull and confirm that the patron name is
  displayed correctly (this tests the display when the format is
  lastname, firstname).
- Edit the same patron and change its category to an organizational one
  (Inter-Library Loan, Library, or School in the sample data).
- View the same pages listed above and confirm that the name displays
  correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Manvi <manvisharma1006@gmail.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 64796fde35)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 4a53efcde4
Bug 41700: Unit test
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 91a78d1aec)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 65fb9c3d60
Bug 41700: Update note_date to datetime
This patch updates the swaager definition to have the correct format

To test:
1 - Enable issue notes:  AllowCheckoutNotes preference
2 - Issue an item to a patron
3 - Sign in to opac as that patron, add a note
4 - Have staff client open and a second tab try:
    http://localhost:8081/api/v1/checkouts/
5 - Error "message":"Does not match date format.","path":"\/body\/0\/note_date"
6 - Apply patch, yarn build, restart all
7 - Refresh the page
8 - Success!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1c60059808)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens e899db69e3
Bug 41315: Don't change which branch is used for getting the transports
See bug 41316 - the script uses the triggers of the issuing branch when sending
by patron library - we shouldn't change this here, but on the next bug

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b034685fe8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens 80505c6024
Bug 41315: (follow-up) Rename statements for clarity
Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37eda84469)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens b31f8c0640
Bug 41315: Remove unecessary conditional
We are in a loop here:
foreach my $branchcode (@branches) {

branchcode must be defined or something has gone seriously wrong with PERL

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ce848197e5)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Nick Clemens a9ccba49c1
Bug 41315: Change only notice branchcode when OverDueNoticeFrom is set to patron-homelibrary
This patch adds a new variable $notice_branchcode and uses this when getting the patron's
homelibrary to ensure we don't change the branch we are using.

To test:
 1 - At branch A - checkout three items, 1 day overdue to 3 patrons of the same category from different branches (not A)
 2 - Set the system preference OverdueNoticeFrom to 'patron home library'
 3 - Browse to More->Tools->Overdue notice/status triggers
 4 - Set overdue triggers for default library and the category used above to:
     Delay: 1
     Letter: Overdue notice (ODUE)
 5 - From the command line run the overdue notices:
     perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
 6 - Note that we begin pass 1 with CPL and then use a different branch for passes 2 and 3
 7 - Apply patch
 8 - Repeat
 9 - Confirm branch is consistent
10 - Run without branch param:
     perl misc/cronjobs/overdue_notices.pl --triggered --library CPL --test --nomail -v -v
11 - Confirm branches are consistent

Signed-off-by: Ben Daeuber <bdaeuber@fargolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 914c8be2c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 0c318aee2d
Bug 41561: Remove 'tab' from admin/aqbudgetperiods
commit 4b312b141a
CommitDate: Wed Sep 19 16:17:16 2012 +0200
    Bug 8117: Divide budget periods into two tabs

It was used at the time
+$url = "aqbudgetperiods.pl?tab=2";

But this has been removed by
commit 870104ce11
Date:   Mon Mar 21 09:32:39 2016 -0400
     Bug 13464 - Standardize the pagination class

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 72b06d3576)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 359016f26a
Bug 41560: Remove id="js" from script tags
Both files
 koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt
 koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt

have
  <script id="js">

That's not needed, useless, and confusing.

Added from those commits for no obvious reasons
catalogue/issuehistory.tt
commit df98c8aaaa
CommitDate: Mon May 14 15:39:44 2012 +0200
    bug_7647: Table sorter on issue history

members/readingrec.tt
commit 77b6409802
CommitDate: Mon Mar 21 20:02:15 2011 +1300
    Bug 5917 : Converted templates

Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8b532fc8f4)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Hammat Wele a84be7b8ee
Bug 40822: Custom cover images not displayed in search results
When using OPACCustomCoverImages, the custom cover image shows
correctly on the bibliographic detail page but does not appear in the
search results list.

To Test:

1. Disable all cover image preferences (OPACLocalCoverImages,
   OPACAmazonCoverImages, SyndeticsCoverImages, GoogleJackets
   OpenLibraryCovers, BakerTaylorEnabled, OPACCoce).
2. Enable OPACCustomCoverImages.
3. Set CustomCoverImagesURL to {956}.
4. Ensure field 956 is visible in the record editor.
    1. Go to Administration --> MARC bibliographic framework.
    2. Click Actions --> MARC Structure for the default framework.
    3. Search for field 956.
    4. Click Actions --> Edit subfields.
    5. Open the u subfield tab.
    6. Make sure the subfield is in tab 9.
    7. Check OPAC, Intranet, and Editor.
    8. Click Save changes.
5. In a bibliographic record, add the following URL to 956:
    https://m.media-amazon.com/images/I/71Uo7Fqbu3L.jpg
6. At the OPAC, perform a search to display the record in a results
   list.
    --> The custom cover image does not appear in the search results
        list.
7. Apply the patch
8. Repeat step 6
    --> The custom cover image appears in the search results.

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 baff2098bd)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Andrew Fuerste Henry ca9197cea2
Bug 41163: Do not decode branchcode in circ log
To test:
1 - confirm circ logging is on
2 - check out an item at Centerville (CPL)
3 - go to the log viewer, find your checkout, confirm the Info column includes "CPL"
4 - switch your logged-in library to Fairfield (FFL)
5 - confirm the log viewer now shows "FFL" in the info column for your checkout
6 - use a report to view action_logs.info for your checkout, confirm the field contains "CPL"
7 - apply patch, restart_all
8 - repeat steps 3-5, confirm "info" column shows "CPL" regardless of logged-in branch

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b3bfd82c76)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:05 +00:00
Jonathan Druart 95e2265759
Bug 39745: Replace more occurrences in selenium tests
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 458a163360)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Fridolin Somers 520de088de
Bug 39745: Fix wrong system preference 'language' in test suite (mock_preference)
Bug 27490 renamed system preference language to StaffInterfaceLanguages.
Needs to be done in test suite on mock_preference calls

Test by running impacted tests

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1534574257)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 3b3e7ee90c
Bug 41710: Correctly run tests SearchEngine/Elasticsearch/Search.t in a txn
Test plan:
0. Apply this patch and startup ktd with elastic (e.g `--search-engine es7`)
1. prove t/db_dependent/check_sysprefs.t
=> pass
2. DB cli> SELECT COUNT(*) FROM systempreferences;
3. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
4. DB cli> SELECT COUNT(*) FROM systempreferences;
=> No change, still the same number of sysprefs
5. prove t/db_dependent/check_sysprefs.t
=> pass
6. Revert this patch or checkout main
7. prove t/db_dependent/Koha/SearchEngine/Elasticsearch/Search.t
8. DB cli> SELECT COUNT(*) FROM systempreferences;
=> One syspref crated (ElasticsearchIndexStatus_mydb)
9. prove t/db_dependent/check_sysprefs.t
=> fail

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 5f9ec5e5c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jacob O'Mara 24ed8c2b0c
Bug 41682: DBRev 25.11.02.001 2026-03-14 12:21:04 +00:00
Lucas Gass dee3a09835
Bug 41682: (RM follow-up) Fix spelling mistake
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit faabc711fa)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 096d31b512
Bug 41682: More fixes
* free => Free
* options=NULL where type=Free
* fix options and type for ArticleRequestsSupportedFormats
* fix more explanation and options

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1b3fe83d6a)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 8f82300253
Bug 41682: Ensure that sysprefs.sql is kept ordered by syspref's name
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f3525b169f)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Jonathan Druart 715fe172ce
Bug 41682: Ignore 'FrameworksLoaded'
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit fecaedbbd8)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi e4c8d07860
Bug 41682: Fix 'cancelation' typo
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit c435b04a93)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi 7e8edad51a
Bug 41682: Fix 'integer' vs. 'Integer' inconsistency
There are 72 occurences for the 'Integer' type, and 8 for 'integer'.
Tests fail because of `StoreLastBorrower` already, so fixing them all for good.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 0ba2c8350c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:04 +00:00
Tomás Cohen Arazi 25c38109a3
Bug 41682: Add ApiKeyLog description
This particular case already introduced discrepancies. Fixing.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8552f04486)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:03 +00:00
Jonathan Druart 65a5f80bd7
Bug 41682: Sync DB and sysprefs.sql for new and upgraded installs
This patch removes the discrepancies and put in sync the
systempreferences table for new and upgraded installations.

Main changes:
* Set options to NULL when options=""
* Fix explanation when different
* Fix wrong order (some rows had options=explanation)
* Fix wrong type "Yes/No" => "YesNo"
* Remove StaffLoginBranchBasedOnIP: both StaffLoginLibraryBasedOnIP and
  StaffLoginBranchBasedOnIP are in the DB for upgraded installs
* Remove the 'showsql' from the test. If we need it back then it must be
  a maintenance script.
* Improve the tests:
  * Compare sysprefs.sql and the DB content for options, explanation and type
  * Catch type not defined
  * Catch incorrect YesNo values (must be 0 or 1)

Later:
* Add a C4::Installer sub to add new syspref:
  add_pref(
      {
          variable    => $variable,
          value       => $value,
          options     => $options,
          explanation => $explanation,
          type        => $type
      }
  );
* Clean 'type' and make it an ENUM
* Make it easy to run the test for devs (should be in xt but we need it
  in t/db_dependent for packages - FIXME?)
* Run the tests on upgraded installs on CI

Test plan:
0. Apply the "tests" patch only
1. prove it
=> It fails loudly
2. Apply the DB change and run updatedatabase, prove the tests
=> they pass
3. Test upgraded installs:
  * checkout v24.05.00 (the version we use for Jenkins'
    Koha_Main_MariaDB_update job)
  * reset_all
  * checkout the branch with this patchset
  * updatabase
  * prove t/db_dependent/check_sysprefs.t
  => Should be green

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 409c804bc1)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 12:21:03 +00:00
Jonathan Druart b3387fe07e
Bug 41682: Add tests
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Edit: uncommented the `Test::NoWarnings` line, probably commented by mistake.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 42c2fc7dbf)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:39:04 +00:00
Connor Cameron-Jones 8e5eb4f818
Bug 41347: Terminology: Item had a reserve waiting
"Item had a reserve waiting" changed to "Hold waiting on item"
"Item was reserved" changed to "hold placed on item"

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b218bbc8c0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:37:48 +00:00
Jonathan Druart dff97ebe39
Bug 41557: Remove unused vars sent to template
488         LoginFirstname               => ( C4::Context->userenv ? C4::Context->userenv->{"firstname"} : "Bel" ),
 489         LoginSurname                 => C4::Context->userenv ? C4::Context->userenv->{"surname"}      : "Inconnu",
 490         emailaddress                 => C4::Context->userenv ? C4::Context->userenv->{"emailaddress"} : undef,

Test plan:
`git grep` the 3 variables and confirm that there is no occurrences in
the templates (.tt/.inc files)

Signed-off-by: Connor Cameron-Jones <22264cc@hvhs.school.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit ac1d6a7f2c)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:37:22 +00:00
David Nind 74a6b76835
Bug 32285: (QA follow-up) Remove additional spaces before colons 325$j
This removes two additional spaces before colons for the UNIMARC 325$j
value builder (unimarc_field_325j.pl plugin).

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b4cbe3c6fe)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:55 +00:00
Photonyx 4f19a921f5
Bug 32285: Removed spaces before the colons
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7bf6f009a6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:54 +00:00