Commit Graph

60217 Commits

Author SHA1 Message Date
Matt Blenkinsop 080fccc0c5
Bug 39438: Add additional fields support to ERM agreement periods
This patch enables additional fields functionality for agreement periods
in the ERM (Electronic Resource Management) module, allowing libraries
to define custom metadata fields for agreement period records.

Changes include:
- Update Koha::AdditionalField to support erm_agreement_periods table
- Modify API definitions to include extended_attributes in responses
- Add erm_agreement_periods option to additional fields admin interface
- Enhance Vue components to display and manage additional field values
- Update ShowElement component to handle period-specific attributes

Test plan:
1. Navigate to Administration > Additional fields
2. Create new fields for "Agreement periods"
3. Edit an ERM agreement and add/edit period information
4. Verify additional fields appear and can be populated
5. Confirm values are saved and displayed correctly

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:10 -07:00
Lari Taskula bee9d8da78
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>
2026-01-30 10:54:10 -07:00
Owen Leonard 4ddbf50529
Bug 40060: Update structure of popup windows in the OPAC
This patch updates templates for OPAC popup windows to add a
fixed "navbar" element at the top of the window with the main heading at
an "X" button which closes the window.

To test, apply the patch and rebuild the OPAC CSS. On each page, test
that the pop-up window looks correct. Confirm that the "X" in the upper
right works to close the window.

- Clear your browser cache if necessary.
- Make sure the opacbookbag, virtualshelves, and OPACComments system
  preferences are enabled.
- Log in to the OPAC and perform a catalog search which will return
  multiple results.
- Select multiple results and choose Add to list -> New list.
  - Test Add to list -> More lists
  - Test Add to list -> (existing list)
- View the contents of a list.
  - Click "Send list" and test the process of sending a list.
- Return to your catalog search results and add multiple items to the
  cart.
  - View the cart
  - Test the "Send" option
- With the OPACComments system preferenc enabled, view the detail page
  for a bibliographic record.
  - Under the comments tab, click "Post your comments..."

Sponsored-by: Athens County Public Libraries
Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:09 -07:00
Nick Clemens 83e553dd9e
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>
2026-01-30 10:54:09 -07:00
Slava Shishkin 27b89b20b8
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>
2026-01-30 10:54:08 -07:00
Martin Renvoize b322e3e959
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>
2026-01-30 10:54:08 -07:00
Pedro Amorim fd87ee6edf
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>
2026-01-30 10:54:07 -07:00
Pedro Amorim 20d20ba9a9
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>
2026-01-30 10:54:07 -07:00
Aya Khallaf bc2d8dc1c3
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>
2026-01-30 10:54:06 -07:00
Pedro Amorim 6473a06916
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>
2026-01-30 10:54:06 -07:00
Pedro Amorim 53a78c501d
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>
2026-01-30 10:54:05 -07:00
Pedro Amorim 51c718b184
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>
2026-01-30 10:54:05 -07:00
Paul Derscheid 1b52f621dc
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>
2026-01-30 10:54:04 -07:00
Lucas Gass af6e9f7063
Bug 28308: DBRev 25.12.00.015
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:04 -07:00
Jonathan Druart 0a42444fee
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>
2026-01-30 10:54:03 -07:00
Jonathan Druart ac724b8f06
Bug 28308: JS changes
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:03 -07:00
Jonathan Druart d2ad74b63c
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>
2026-01-30 10:54:02 -07:00
Emmi Takkinen 4e6e7bd914
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>
2026-01-30 10:54:02 -07:00
Jonathan Druart d94e2b26b6
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>
2026-01-30 10:54:01 -07:00
Jonathan Druart 8af1ad8688
Bug 41173: Add a Cypress test
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:01 -07:00
Tomas Cohen Arazi 7a614e4c67
Bug 41173: Fix ERM breadcrumb causing page reload
The main ERM route was missing a 'name' property, causing the
navigation store to treat it as an external path (.pl extension).
This resulted in breadcrumb links using href instead of router-link,
causing unwanted page reloads.

To test:
1. Navigate to ERM module
2. Go to any sub-section (Agreements, Licenses, etc.)
3. Click on 'E-resource management' in the breadcrumb
=> FAIL: Notice the page reloads!
4. Apply the patch
5. Repeat steps 1-3
=> SUCCES: Verify the page doesn't reload and navigation works smoothly
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:00 -07:00
Owen Leonard ead9dd4cac
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>
2026-01-30 10:53:52 -07:00
David Cook c3169205ec
Bug 41662: Prevent CSRF on opac-patron-consent.pl
This change prevents CSRF on opac-patron-consent.pl by
adding checking of the "op".

Test plan:
0. Apply the patch and koha-plack --restart kohadev
1. Set system preference PrivacyPolicyConsent to "permissive"
2. Log into the OPAC and go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=1
3. Note that it doesn't change the consent
4. Go to this path:
/cgi-bin/koha/opac-patron-consent.pl?check_GDPR_PROCESSING=0
5. Note that it doesn't change the consent
6. Click the "Yes" radio button and click "Save"
7. Note it changes the consent to Yes
8. Click the "No" radio button and click "Save"
9. Note it changes the consent to No

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-29 15:11:21 -07:00
Lisette Scheer c1d863902a
Bug 41593: (QA follow-up) Move cypress test
This patch moves the cypress test into the Acqusitions folder to help keep t/cypress/integration organized as we add more tests.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-29 15:11:21 -07:00
Jonathan Druart 1e5d8703da
Bug 41593: Add a Cypress test
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-29 15:11:20 -07:00
David Cook 690bd0568f
Bug 41593: Validate displayby parameter in suggestion.pl
This change validates the displayby parameter in suggestion.pl
in order to prevent SQL injection.

Test plan:
0. Do not apply the patch
1. Log into the staff interface
2. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
3. Notice a 500 error is generated
4. In the error logs, the MySQL version number will appear

5. Apply the patch
6. koha-plack --restart kohadev

7. Visit the path /cgi-bin/koha/suggestion/suggestion.pl?
op=else&displayby=status+AND+EXTRACTVALUE(1,CONCAT(0x7e,@@version))
8. Notice that no error is generated
9. Try each of the "Organize by" options on the left nav bar
10. Note that none of them generate an error and that the option is
retained after clicking "Go"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-29 15:11:12 -07:00
Owen Leonard 64796fde35
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>
2026-01-28 14:24:06 -07:00
Nick Clemens 91a78d1aec
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>
2026-01-28 14:24:05 -07:00
Nick Clemens 1c60059808
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>
2026-01-28 14:24:05 -07:00
Nick Clemens b034685fe8
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>
2026-01-28 14:24:04 -07:00
Nick Clemens 37eda84469
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>
2026-01-28 14:24:04 -07:00
Nick Clemens ce848197e5
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>
2026-01-28 14:24:03 -07:00
Nick Clemens 914c8be2c0
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>
2026-01-28 14:24:03 -07:00
Paul Derscheid 1e4b9e33c7
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>
2026-01-28 14:24:02 -07:00
Martin Renvoize 6c63cb90fa
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>
2026-01-28 14:24:02 -07:00
Martin Renvoize acc2985e6a
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>
2026-01-28 14:24:01 -07:00
Martin Renvoize 7c4f5eeb56
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>
2026-01-28 14:24:01 -07:00
Martin Renvoize de4badb166
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>
2026-01-28 14:24:00 -07:00
Jonathan Druart 72b06d3576
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>
2026-01-28 14:24:00 -07:00
Jonathan Druart 8b532fc8f4
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>
2026-01-28 14:23:59 -07:00
Hammat Wele baff2098bd
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>
2026-01-28 14:23:59 -07:00
Andrew Fuerste Henry b3bfd82c76
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>
2026-01-28 14:23:51 -07:00
Lucas Gass faabc711fa
Bug 41682: (RM follow-up) Fix spelling mistake
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-28 07:32:02 -07:00
Jonathan Druart 1b3fe83d6a
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>
2026-01-27 13:56:19 -07:00
Jonathan Druart f3525b169f
Bug 41682: Ensure that sysprefs.sql is kept ordered by syspref's name
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-27 13:56:18 -07:00
Jonathan Druart fecaedbbd8
Bug 41682: Ignore 'FrameworksLoaded'
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-27 13:56:11 -07:00
Fridolin Somers 1534574257
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>
2026-01-26 14:36:44 -07:00
Jonathan Druart 5f9ec5e5c0
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>
2026-01-26 14:36:43 -07:00
Jonathan Druart de3a33a563
Bug 38207: Add VENDOR_PAYMENT_METHOD for new installs
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-26 14:36:43 -07:00
Lucas Gass 84227f70db
Bug 41682: DBRev 25.12.00.014
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:54 -07:00