Commit Graph

60025 Commits

Author SHA1 Message Date
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
Raguram Gopinath fa06b8e0f9
Bug 40031: Redirect to add action page from add template form
Test plan:
1. Login to staff client.
2. Go to: Cataloging > MARC modification templates > New template
3. Give new template a name and click submit.
4. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl
If you are using KTD
5. Apply patch and restart services.
6. Repeat steps 2 and 3.
7. Following URL loads: http://localhost:8081/cgi-bin/koha/tools/marc_modification_templates.pl?template_id=(template_id)&op=select_template
8. You can now add actions for your new template.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 8a09573fa3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:35 +00:00
Lari Taskula 12eda3ea41
Bug 35423: Fix substr outside of string warning
To test:

Before applying patch

1. Create an authority record, fill field 400$w with "n"
2. Search for the authority you just created
3. Observe a warning has been logged

"substr outside of string"

4. Apply patch
5. Refresh the search results from step 2
6. Observe no warnings have been logged

Signed-off-by: Harrison Hawkins <harrisonhawkins@catalyst.net.nz>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 3c34d7bf43)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:36:14 +00:00
Owen Leonard 5f40e97139
Bug 39715: (follow-up) Undo change to shelves_results.tt
This must have been an overzealous find and replace. A similar template,
itemsearch_json.tt, was not similarly affected.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e84cbd496)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:35:44 +00:00
Owen Leonard 458a3d7add
Bug 39715: Do not quote DataTables options
This patch updates templates so that the options passed to DataTables
(via kohaTable) are not quoted. The quotes are not necessary, and
are not consistent with official DataTables documentation. This
establishes a standard for us to follow in the future.

The patch also corrects some option names which required upates,
particularly "sorting" -> "order".

To test, apply the patch and test updated DataTables.

Sponsored-by: Athens County Public Libraries

Rebased-by: Jonathan Druart
paginate => paging

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 684c014577)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:35:43 +00:00
Lucas Gass 112b257a4d
Bug 41539: (follow-up) Add missing filters
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 166604f9f3)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:37 +00:00
Nick Clemens 1947118ce7
Bug 41539: (QA follow-up) Add classes for styling
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f9912bcd1d)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:36 +00:00
Andrew Fuerste Henry 1efee676c3
Bug 41539: Add item barcode to hold waiting message
To test:
1 - have or create a waiting hold
2 - go to the patron's record, see your waiting hold is listed in the patron messages but does not include barcode
3 - apply patch, reload page
4 - confirm item barcode appears on both Check Out and Details pages, for holds waiting both at your current branch and at another branch

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 8a7109be70)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-03-14 11:34:35 +00:00
Chloe Zermatten 22c09155c9
Update release notes for 25.11.02 release 2026-02-23 16:55:40 +00:00
Chloe Zermatten 0585588d4b
Increment version for 25.11.02 release
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:44 +00:00
Jonathan Druart 34050c8180
Bug 41591: Remove view=1 parameter from the invoices table
It has been removed in the controller by the previous patch.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:39 +00:00
David Cook b6ec792aa5
Bug 41591: Prevent inline rendering of invoice files
This patch forces download of invoice files rather than showing
them inline where they can potentially perform XSS

Test plan:
0. Apply the patch
1. koha-plack --restart kohadev
2. Find or create an active vendor
3. Create a basket if one doesn't already exist
4. Receive a shipment for the vendor
5. Create an invoice
6. Go to the invoice
7. In the URL change invoice.pl to invoice-files.pl
(or turn on AcqEnableFiles and go to it that way)
8. Upload an image file (e.g. SVG) or PDF
9. Click on the filename
10. Note that instead of displaying in the browser,
the file will be downloaded

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Chloé Zermatten <chloe.zermatten@openfifth.co.uk>
2026-02-23 16:41:31 +00:00
Martin Renvoize 46006a5b5b
Bug 39584: Fix end date disable to check selected item, not all items
When a specific item is selected in the booking modal, the end date
disable logic was incorrectly checking if ALL bookable items were
unavailable before disabling a date. This meant dates with existing
bookings for the selected item remained selectable if other items
were available.

Now when a specific item is selected (booking_item_id != 0), the
logic checks if that specific item is in the unavailable_items list.
The "all items unavailable" check is only used when "Any item" is
selected.

This aligns the end date selection behavior with the start date
selection behavior, which already correctly checks only the selected
item.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e58d39671f)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:39:38 +00:00
Martin Renvoize 65a56b9de7
Bug 39584: Fix trail period incorrectly limiting max booking date
This commit fixes a bug where the trail period was preventing selection
of the maximum end date allowed by circulation rules, even when there
were no booking conflicts in the trail period.

The Problem:
============
The hover logic in place_booking.js checked if ANY disabled date fell
within the trail period and would prevent selection. However, dates can
be disabled for multiple reasons:
1. They conflict with an existing booking (correct reason to disable)
2. They are beyond the maxDate set by circulation rules (incorrect!)
3. They are in the past

When hovering over the max selectable end date, the trail period would
extend beyond the maxDate. Those dates were disabled by flatpickr
automatically, and the code incorrectly interpreted this as a booking
conflict, preventing selection of the otherwise valid max date.

The Fix:
========
Modified the trail period conflict check (lines 995-1005) to only
consider dates that are within the max date range. Disabled dates
beyond the maxDate are now ignored when checking for trail conflicts.

Before:
  if (elemDate.isAfter(trailStart) && elemDate.isSameOrBefore(trailEnd)) {
      trailDisable = true;
  }

After:
  if (elemDate.isAfter(trailStart) && elemDate.isSameOrBefore(trailEnd)) {
      const maxDate = periodPicker.config.maxDate ? dayjs(periodPicker.config.maxDate) : null;
      if (!maxDate || elemDate.isSameOrBefore(maxDate)) {
          trailDisable = true;
      }
  }

This ensures trail periods only prevent selection when they conflict
with actual bookings, not when they extend beyond the circulation
rules' maximum date.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 22c8829738)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:39:37 +00:00
Martin Renvoize f973bf0287
Bug 39584: Add Cypress tests for bookings lead and trail period behavior
This commit adds comprehensive Cypress tests for the lead and trail period
functionality in the bookings modal date picker. These tests validate the
hover effects, conflict detection, and date selection constraints.

The tests use cy.clock() to fix "today" to June 10, 2026, enabling
deterministic testing without date arithmetic complications.

Test coverage includes:
- Lead period visual hints (CSS classes on hover)
- Lead period conflict prevention with past dates
- Lead period conflict prevention with existing bookings
- Trail period visual hints (CSS classes on hover)
- Trail period conflict prevention with existing bookings
- Max date selection when trail period is clear (no false restrictions)

Test setup:
- Fixed date: June 10, 2026
- Lead period: 2 days
- Trail period: 3 days
- Issue length: 3 days with 2 renewals of 2 days each
- Max booking period: 7 days
- Blocker booking: June 25-27 (tests both lead and trail conflicts)

Test phases:
1. Hover June 13 - lead period (June 11-12) is clear, no leadDisable
2. Select June 13, hover June 16 - trail period (June 17-19) is clear
3a. Hover June 11 - lead period includes past date (June 9), leadDisable
3b. Hover June 29 - lead period overlaps blocker (June 27), leadDisable
4. Select June 20, hover June 23 - trail overlaps blocker, trailDisable
5. Select June 13, hover June 20 (max) - trail is clear, selectable

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9284a43817)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:39:36 +00:00
Lucas Gass 86b4c3c0fa
Bug 39916: (RM follow-up) Tidy
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 928abfcdc2)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:57 +00:00
Paul Derscheid 4317f46642
Bug 39916: (QA follow-up) Fix startRange class lost on month navigation
When selecting a booking start date that triggers month navigation
(e.g., selecting Feb 1 while viewing January), the flatpickr calendar
would lose the 'startRange' CSS class on the selected date. This
occurred because setting maxDate in the onChange handler triggered a
calendar redraw, and flatpickr only applies startRange during the
initial click event, not during redraws.

This caused the Cypress test "should handle date range validation
correctly" to fail on dates near month boundaries (e.g., January 30).

The fix re-applies the startRange class after the maxDate is set,
using setTimeout to ensure it runs after the redraw completes. A
guard ensures this only happens when exactly one date is selected,
preventing interference with end date selection.

To test:
- Apply patch
- Open a biblio detail page with bookable items
- Click "Place booking"
- Select a patron, pickup location, and item
- In the date picker, click a date that's in the next month
  (visible in the "next month" area of the calendar)
- Verify the selected date shows the startRange styling (highlighted
  as the range start)
- Select an end date
- Verify the range is properly selected and the form can be submitted
- Run Cypress tests:
  yarn cypress run --spec t/cypress/integration/Circulation/bookingsModalDatePicker_spec.ts
- Verify all tests pass

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37c8b7544e)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:56 +00:00
Paul Derscheid 2956be23ee
Bug 39916: (QA follow-up) Fix typo in test comment
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1e4b9e33c7)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:52 +00:00
Martin Renvoize 99a29445e0
Bug 39916: Fix booking modal race conditions and redraw issues
This patch addresses two critical issues in the booking modal:

1. Race condition in edit mode:
   When editing a booking, the item selection would sometimes fail to
   properly initialize because the item options weren't fully loaded
   with their data attributes. This caused the itemtype field to not
   auto-populate correctly.

   Fixed by moving the item pre-selection to occur after a brief delay
   and ensuring the select2:select event is triggered with proper data
   parameters including the element reference.

2. Flatpickr redraw issue:
   The datepicker would lose its disabled dates after certain operations
   because the disable configuration wasn't being reapplied during redraws.

   Fixed by explicitly setting the disable configuration before calling
   redraw() to ensure disabled dates are properly maintained.

Additionally fixes a scope issue with the booking loop variable.

Test plan:
1. Create a booking with specific dates
2. Edit the booking - verify the item and itemtype are correctly selected
3. Change selections in the modal - verify disabled dates remain correct
4. Create new bookings - verify date restrictions work properly

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6c63cb90fa)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:51 +00:00
Martin Renvoize 332c58b925
Bug 39916: Cypress tests for the bookings modal
This patch adds comprehensive Cypress end-to-end tests for the booking modal,
covering all critical functionality to prevent regressions.

Test coverage includes:
- Basic modal functionality (bookingsModalBasic_spec.ts):
  * Modal loading and initial state
  * Progressive field enabling based on user selections
  * Item type and item dependencies
  * Form validation
  * Booking submission (create and update)
  * Form interactions and field visibility
  * Edit mode functionality
  * Error handling

- Date picker functionality (bookingsModalDatePicker_spec.ts):
  * Flatpickr initialization with future-date constraints
  * Date disabling for existing bookings
  * Date range validation
  * Circulation rules date calculations and visual feedback
  * Lead and trail period functionality
  * Event dots for dates with existing bookings

These tests ensure the booking modal works correctly across all scenarios and
helps maintain code quality during future development.

Test plan:
1. Run the tests inside KTD container:
   docker exec --user kohadev-koha --workdir /kohadevbox/koha -i kohadev-koha-1 \
     bash -c 'npx cypress run --spec "t/cypress/integration/Circulation/bookings*.ts"'
2. Verify all 15 tests pass (9 basic + 6 datepicker)
3. Confirm test coverage is comprehensive for the booking modal

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit acc2985e6a)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:50 +00:00
Martin Renvoize e8ace148e7
Bug 39916: Add flatpickr helpers to cypress
This adds helper methods for cypress to work with flatpickr date pickers:
- openFlatpickr() - open the calendar
- selectFlatpickrDate() - select a single date
- selectFlatpickrDateRange() - select date range
- clearFlatpickr() - clear the selected dates
- getFlatpickrDate() - get specific date element
- getFlapickrSelectedDates() - get flatpickr selected dates array
- navigateToFlatpickrMonth() - navigate calendar

These helpers simplify date picker testing when using flatpickr.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 7c4f5eeb56)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:49 +00:00
Martin Renvoize 5144f5cec4
Bug 39916: Add select2 helpers to cypress
This adds helper methods for cypress to work with select2 dropdowns:
- selectFromSelect2ByIndex() - select by option index
- selectFromSelect2() - select by text value
- clearSelect2() - clear selection

These helpers handle the complexities of interacting with Select2
components which cannot be selected using standard Cypress commands.

Signed-off-by: Kristi Krueger <kkrueger@cuyahogalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit de4badb166)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-18 13:38:48 +00:00
Owen Leonard 4d1a1aa80e
Bug 41497: ul.patronbriefinfo inconsistent in coding structure
This patch updates the markup of the include which displays patron
information on the checkout and patron detail pages. The changes are
minor and should have no visible effect.

To test, apply the patch and search for a patron in the staff interface.

View the patron information in the sidebar on both the checkout and
patron detail pages. Everything should look correct.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Manvi <manvisharma1006@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6efd0b04e0)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:33:08 +00:00
Mercury WallacE 14eb290f54
Bug 41398: Fixed Typo of Tagret item is not in the local hold group
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 db11834480)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:32:38 +00:00
Mia 6f765ca4ad
Bug 41397: Changed "not reservable" to "cannot be placed on hold"
test plan -
step 1 - apply patch
step 2 - observe in koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt:221 that Target item is not reservable is now cannot be placed on hold

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 02b752e25c)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:32:28 +00:00
Photonyx 8f1650ef6b
Bug 41351: Capitalisation fix
Corrected and standardized the capitalization of "Override Renew hold
for another" to "Override renew hold for another"

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 23dfbd051f)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:28:54 +00:00
Samuel Young 3cf56b3b38
Bug 41540: Updated description for system preferences for staffShibOnly
Test Plan:
1. Apply Patch, go to the staff client
2. Navigate to the Administration
3. Search for staffShibOnly within System Preferences
4. Check that the description properly displays the right information
   "staff to log in by means other than Shibboleth"

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 ccf41d8b21)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:28:39 +00:00
Lari Taskula 8b16944e09
Bug 41000: Relabel 041$d "Spoken language" to "Sung or spoken language"
Updates the XSLT templates for detail pages in the staff interface
and OPAC to label 041$d in MARC21 as "Sung or spoken language",
matching the MARC21 definition.

For music libraries, this also better reflects the information
about the record.

To test:
1. Apply patch
2. Catalog a record with 041$d
3. Navigate to the record details both in the staff interface
   and OPAC
4. Observe "Sung or spoken language: <041$d>"

Signed-off-by: Lawrence O'Regan-Lloyd <loreganlloyd@clamsnet.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 88e07a074e)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:26:33 +00:00
David Cook 219aac92eb
Bug 40719: Explicitly turn off RELATIVE for TemplateUtils
This change explicitly turns off RELATIVE in Koha/TemplateUtils.pm

Test plan (Koha/TemplateUtils.pm):
0. Apply the patch and koha-plack --restart kohadev
1. Go to http://localhost:8081/cgi-bin/koha/tools/letter.pl
2. Click "New notice" and choose "reports"
3. Add the following to the report:
[% IF ( x == 1 ) %]
One
[% ELSE %]
Two
[% END %]
4. Go to http://localhost:8081/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved
5. Create a report like the following:
SELECT biblionumber FROM biblio;
6. Click "Run with template" and choose the Reports template you made
7. Note that the output shows "Two"
8. Edit your Reports notice and include the following:
[% INSERT ../etc/passwd %]
9. Re-run the report using "Run with template"
10. Note that the output shows the regular SQL results (ie template transform not successful)

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit b86095ffe7)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:24:12 +00:00
Kyle M Hall b36dca90b1
Bug 40719: Explicitly disable off RELATIVE file paths for plugins for user-entered templates
In bug 39184 we set EVAL_PERL and ABSOLUTE to 0, which is the default. RELATIVE also defaults to 0. For security we should probably specify that as well in case the default is changed somehow.

Test Plan:
1) Apply this patch
2) Generate some notices
3) No change should be noted!

Signed-off-by: noah <noah@inlibro.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit bd85f990da)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:24:10 +00:00
Pedro Amorim af3c80b9af
Bug 41009: Return to 'Manage request' page after editing
Test plan (before applying patch):
1) Enable ILLModule
2) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) After creating the request, you're on the 'Manage request' page.
4) Click 'Edit request'. Click 'Submit'. Notice you're redirected to the list table.
5) Apply patch. Repeat. Notice you're sent to the ILL request 'Manage request' page.

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 db22aad838)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:21:28 +00:00
Kyle M Hall a369411404
Bug 32370: (QA follow-up) Add https to license url, use Test::NoWarnings
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 356903a96a)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:20:24 +00:00
Tomas Cohen Arazi 61f75a7a6b
Bug 32370: Adapt Koha::Auth::Identity::Provider
This patch adapts the Koha::Auth::Identity::Provider class to
make use of this, and also to prove the behavior is correct (expected
results, exceptions, encoding, etc).

To test:
1. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Auth/Identity/Provider.t \
           t/db_dependent/api/v1/idp.t
=> SUCCESS: Identity provider related tests pass!
2. Apply this patches
3. Repeat 1
=> SUCCESS: Tests still pass!
4. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71fce974e3)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:20:23 +00:00
Tomas Cohen Arazi 6dbba6ad12
Bug 32370: Provide a generic set of tools for JSON fields
This patch introduces a new class for extending Koha::Object-based
classes so they have reusable ways to deal with JSON encoded fields.

As documented in the POD, classes can now

```perl
use base qw(Koha::Object Koha::Object::JSONFields);
```

and will have the following methods available:

* decode_json_field
* set_encoded_json_field

For convenience, the Koha::Auth::Identity::Provider class is tweaked to
make use of this, and also to prove the behavior is correct (expected
results, exceptions, encoding, etc).

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/Koha/Object/JSONField.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 6d4965f2d3)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:20:21 +00:00
Tomas Cohen Arazi 4b88e3cca4
Bug 32370: Unit tests
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d919f77118)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:20:20 +00:00
Owen Leonard 94c04b9b51
Bug 38643: (QA follow-up) Replace _() with __() in global.js
The double-underscore function is required for translations to be picked
up in JS files.

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 d5de3ee6cd)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:15:13 +00:00
Laura_Escamilla 4bf8963906
Bug 38643: Added JS for the dynamic placeholders
To test:

1. Visit http://localhost:8080/cgi-bin/koha/opac-main.pl — notice that
   the main search bar has a placeholder.
2. Visit the advanced search page. Notice that the search bars in the
   advanced search do not have placeholders.
3. Apply this patch. restart_all
4. Refresh the page on the advanced search. Notice that the search bars
   now have placeholders. Try switching out the dropdown options and
   notice that the placeholder text changes depending on what you
   select.
5. Test searches and make sure everything works as expected.
6. Sign off — have an amazing day! :D

Signed-off-by: Ludovic <ludovic.julien@inlibro.com>
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 7c5c8e74bc)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:15:11 +00:00
Laura_Escamilla 458a8293c7
Bug 38643: Added dynamic placeholders to the advanced search inputs
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 2ad6b96983)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:15:10 +00:00
Laura_Escamilla dcf2e8803d
Bug 40794: Add id='account-tabs' wrapper to payment and account tab templates
This patch adds a new id="account-tabs" to that div.

To test:

Apply the patch and restart_all. Clear browser cache if necessary.

1. Go to a patron’s accounting tab → Transactions / Make payment / Manual invoice / Manual credit.
2. Inspect the HTML for the tabs menu. The surrounding div should have both class="toptabs" and id="account-tabs".
3. Verify styling and tab functionality remain unchanged.
4. Sign off and have a great day! :D

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 b28daeb973)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:14:02 +00:00
Jonathan Druart 1a9d73b75b
Bug 41047: Sort libraries by description instead of code
On the holdings tables the libraries are sorted by code, we should sort
them by description.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 9f947a2517)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:13:32 +00:00
Pedro Amorim 2b98e4de33
Bug 41054: Sort metadata keys alphabetically case insensitive
This coincidentally+nicely puts eISSN before ISSN on the 'manage request page' while keeping the rest of the order as before

Test plan:
1) Enable ILLModule
2) Create a new ILL request, visit:
<staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard
3) Pick type one of 'journal article', 'conference', 'journal', 'generic resource'
4) Enter cardnumber, library, eISSN and other data if you want
5) Notice 'eISSN' shows on the 'Manage request' page.
6) Test again by creating an OPAC request, visit:
<opac_url>/cgi-bin/koha/opac-illrequests.pl?op=add_form&backend=Standard

Signed-off-by: Richard Bridgen <Richard.Bridgen@nhs.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 32ea6abb1e)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:13:08 +00:00
Pedro Amorim 8ebe0458b9
Bug 41054: Add eISSN to Standard forms
Signed-off-by: Richard Bridgen <Richard.Bridgen@nhs.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d8989fe57f)
Signed-off-by: Jacob O'Mara <jacob.omara@openfifth.co.uk>
2026-02-16 15:13:07 +00:00