Commit Graph

1968 Commits

Author SHA1 Message Date
Kyle M Hall 560d7b7ff7
Bug 42443: Convert transfers to receive page to ajax datatable
Updates circ/transferstoreceive.pl to use the new REST API with
an ajax DataTable to display transfer to receive.

Test Plan:
1) Apply this patch
2) Restart all the things!
3) Set an item in transit to your logged in library ( check it in at another
   branch so it is sent home, or place a hold to trigger a transfer )
4) Place a hold on a second transferred item, and a recall on a third
5) Browse to /cgi-bin/koha/circ/transferstoreceive.pl
6) Note the "On hold for" column shows the hold patron, the recall patron or
   "None"
7) Set TransfersMaxDaysWarning low and note the "days late" badge appears
8) Click "Cancel transfer" and note the transfer is cancelled
9) A library with no incoming transfers will get "No transfers to receive"

Signed-off-by: Alex Carver [Acerock7] <alex@rcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-04 11:23:28 +00:00
Martin Renvoize c215f2dd43
Bug 30144: Add UI for servicing instructions
This patch adds the user interface for managing and displaying
EDIFACT servicing instructions in the acquisitions module.

Changes to acqui/neworderempty.pl:
- Parses servicing_instruction JSON for editing existing orders
- Fetches EDIFACT_SI authorized values for dropdown
- Passes data to template in both array and JSON formats

Changes to acqui/addorder.pl:
- Accepts servicing_instruction_groups_json from form submission
- Validates and stores JSON in database

Changes to acqui/basket.pl:
- Fetches EDIFACT_SI authorized values
- Formats servicing instructions for display in get_order_infos()
- Creates human-readable display strings with:
  * LVC codes replaced with descriptions
  * Groups separated by <br> tags
  * Format: "Description" or "Description: free text"

Changes to neworderempty.tt:
- Dynamic UI for adding/removing servicing instruction groups
- Each group can contain:
  * One LVC (coded) instruction only, OR
  * One LVT (free-text) instruction only, OR
  * One LVC + one LVT combination
- Validation prevents:
  * More than 2 instructions per group
  * Duplicate LVC or LVT in same group
- LVC instructions use dropdown populated from EDIFACT_SI authorized values
- LVT instructions use free-text input
- Groups serialized to JSON hidden field for form submission
- Smart button labels show what can be added to each group

Changes to basket.tt:
- Displays servicing instructions in basket table
- Pre-formatted in Perl (no JavaScript parsing needed)
- Shows LVC descriptions instead of codes
- Multiple groups displayed on separate lines

Changes to columns_settings.yml:
- Adds servicing_instruction column to basket table configuration

Display format examples:
- LVC only: "Barcode labelling"
- LVT only: "Handle with care"
- Combined: "Binding: Apply to spine"
- Multiple groups (on separate lines):
  Barcode labelling
  Binding: Special instructions

Test plan:
1. Create/edit order
2. Add servicing instruction groups
3. Try to add more than 2 instructions to a group (should prevent)
4. Try to add duplicate LVC or LVT to group (should prevent)
5. Save order
6. View basket and verify instructions display correctly
7. Edit order and verify instructions load into form

Sponsored-by: Martin Renvoize <martin.renvoize@gmail.com>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-28 16:36:22 +00:00
Olivia Reynolds ad30c815ce
Bug 34166: Add total column to suggestions table
This patch displays the "total_price" field from the API in the
acquisition suggestions table. In line with other totals, it is
displayed unitless after currency conversion.

Test plan:
1.  Navigate to Acquisitions > Suggestions.
2.  Click "New purchase suggestion", then add a title, price, and
    number of copies.
3.  Make note of the calculated total price.
3.  Save the suggestion to return to the table.
4.  Verify there is no "Total" column on the suggestions table.
5.  Apply patch, update database, and refresh.
6.  Verify there is a "Total" column on the suggestions table that
    matches the previously displayed total price.
7.  Verify the "Total" column is listed under the "Columns" dropdown.
8.  Above the suggestions table, click "Configure".
9.  In the column settings for suggestions, check both "Is hidden by
    default" and "Cannot be toggled" for "total".
10. Underneath the column settings for suggestions, uncheck "Save
    configuration state on page change".
11. Save the column settings.
12. Return to the suggestions table.
13. Verify the "Total" column is hidden.
14. Verify the "Total" column is not listed under the "Columns"
    dropdown.

Sponsored-by: Open Fifth
Signed-off-by: Michaela <michaela.sieber@kit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-21 15:58:24 +00:00
Andrew Fuerste Henry 549e0b3068
Bug 42553: (QA Follow-up) tidy preferences.pl
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-19 14:33:57 +00:00
Martin Renvoize eb93c2b2e7
Bug 42553: preferences.pl: Allow 'multiple_sortable' to use 'authval' source
The 'choices' renderer in admin/preferences.pl already supports a
dynamic 'authval' source: the YAML can say

    choices: authval
    source: SOMECATEGORY

and the choices are populated from the named authorised value category
at render time.

The 'multiple_sortable' renderer (the SortableJS-backed drag-and-drop
multi-select used by OPACAuthorIdentifiersAndInformation and
ArticleRequestsSupportedFormats) had no equivalent — choices had to be
hardcoded in the .pref YAML.

This patch adds the same dispatcher to 'multiple_sortable' so prefs
needing an ordered, picker-driven multi-select of authorised values
can declare:

    multiple_sortable: authval
    source: PAYMENT_TYPE

Behaviour for existing prefs (which pass a hash directly to
'multiple_sortable') is unchanged — the new branch only fires when the
value is a scalar.

Test plan:
1. Create a temporary system preference using the new pattern, e.g. by
   adding to admin/preferences/accounting.pref:
       - pref: TestSortableAV
         multiple_sortable: authval
         source: PAYMENT_TYPE
   and seeding INSERT INTO systempreferences with type='Free'.
2. Visit Administration > System preferences and find the pref.
3. Verify the widget renders as a sortable list of every value in the
   PAYMENT_TYPE authorised value category, with checkboxes and drag
   handles, matching the look of OPACAuthorIdentifiersAndInformation.
4. Pick two or three, reorder them, save.
5. Reload the page and verify the order and selection are preserved.
6. With 'source' omitted or 'multiple_sortable' set to a string other
   than 'authval', verify the page raises a clear error.
7. Existing prefs (OPACAuthorIdentifiersAndInformation,
   ArticleRequestsSupportedFormats) continue to render unchanged.

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Debbie McCarthy <debbie.mccarthy@westsussex.gov.uk>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-19 14:33:56 +00:00
Olivia Reynolds 0bb26abd5a
Bug 41105: Add gender to batch patron modification
This patch adds the ability to batch-edit the gender field for patrons.

Test plan:
1.  Ensure there are a number of patrons in the database.
2.  Apply patch.
3.  Navigate to Patrons and click Search, to display a list of patrons.
4.  Select all results and click "Batch patron modification".
5.  Verify the "Gender" column is displayed.
6.  Verify the "Gender" column may be toggled under the "Columns"
    dropdown.
7.  Select a subset of the patrons for modification.
8.  Verify there is a "Gender" option beneath the table.
9.  Select "Female" as the gender, and click "Save".
10. Verify the gender of all selected patrons was set to "Female".
11. Repeat with "Male" and "Other" as the gender.
12. Repeat with clearing the gender field by ticking the checkbox next
    to the dropdown and saving. Verify the gender field is blank for
    each selected patron.

Sponsored-by: Open Fifth
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.ai>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-14 12:09:15 +00:00
Martin Renvoize df7e600587
Bug 41649: Add option to set magnetic flag for item itemtypes
This patch adds the ability to set an item type as magentic for SIP
response purposes.

Test plan:
1) Run included database updates
2) Navigate to admin > itemtypes
3) Edit/Add an itemtype and scroll to the 'Sip media types' input
4) A new 'Sip magnetic' checkbox should be available
5) Confirm setting/unsetting it works as expected
6) The SIP magnetic flag bit should respect the setting
7) To test SIP functionality:
   a) Start the SIP server (e.g., koha-sip service)
   b) Create an item with an itemtype that has sip_magnetic checked
   c) Use misc/sip_cli_emulator.pl to send a checkout request:
      perl misc/sip_cli_emulator.pl -a localhost -p 6001 -su <sip_username> -sp <sip_password> -l <location_code> --patron <patron_cardnumber> --password <patron_password> --item <item_barcode> -m checkout
   d) Check the SIP response to ensure it handles magnetic media correctly (e.g., no desensitization flag)

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Signed-off-by: Marcus Michel <marcus.michel@rbkc.gov.uk>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-08-06 16:07:33 +00:00
Cameron E. Tidd 67a37a07c3
Bug 16631: Institute library limits
This patch implements the library_limit concept for Report/Reports. Staff with the correct permission and superlibrarians can set libaries to which the report should be visible, if the system preference is enabled.

Test plan:
Confirm Initial Settings
1. Log in to Koha staff with username: koha and password: koha and set your library as Centerville if it's not already.
2. Visit the Saved reports page, and create and save three reports: Report 1, Report 2, and Report 3. The SQL query for each report doesn't matter, it should just be something valid.
3. Visit the Patrons page and create two staff users: StaffReportLimitUser and StaffNoLimitPermission. Set their home libraries to Centerville and Fairfield, respectively.
4. Under Allow access to the reports module, ensure both users have report management permissions for Create, Delete, Execute.

Verify Patch Settings
5. Apply the patch and restart services. If using Koha Testing Docker (KTD): from the Koha repo directory, apply the patch (e.g. `git bz apply 16631`, or check out the patched branch with `git fetch && git checkout <branch>`), then run `ktd --shell` to enter the KTD shell and run `restart_all`. If the patched branch is already checked out, just enter the KTD shell and run `restart_all`.
6. Click Patrons in the top navbar to go to the Patrons page.
7. Search for "StaffReportLimitUser" in the patron search field.
8. Click StaffReportLimitUser to edit the patron record for this user.
9. Click More -> Set permissions to access the permissions screens for the StaffReportLimitUser.
10. In the row for Allow access to the reports module (reports), click Show details to view relevant permissions.
11. Confirm Manage Report Limits (manage_report_limits) is an option under Allow access to the reports module (reports).
12. Click the checkbox for Manage Report Limits to give this user this permission, and click Save.
13. Go to the System Preferences page (Click the More dropdown from the top nav bar, click Administration, click System Preferences).
14. Verify Reports is an option in the left side navigation bar, and that when clicked, you see the LimitReportsByBranch option.
15. Enable LimitReportsByBranch as described in step 14.
16. Go back to Saved reports as in Step 2.
17. Click Edit in the row menu for Report 1.
18. At the bottom of the Report 1 edit page, you should see a Library limitation select box.

Verify the Library Limitation Settings are Persisted
19. Choose Centerville from the select box and click Update SQL.
20. Reload the page, or navigate away from the page and go back to the edit screen for Report 1.
21. Verify that Centerville is still in the Library limitation select box.
22. Add Fairfield in the Library limitation select box and click Update and run SQL.
23. Go back to editing Report 1.
24. Confirm the Library limitation select box has both Centerville and Fairfield selected.
25. Duplicate Report 1.
26. Confirm the Library limitation select box has both Centerville and Fairfield selected.
27. Click Save Report.
28. Confirm the Library limitation select box has both Centerville and Fairfield selected.

Verify Reports are Limited Based on Library Limitations
29. Edit Report 1 to add Centerville in the Library limitation select box as the only choice and click Update SQL.
30. Edit Report 2 to add Fairfield in the Library limitation select box as the only choice and click Update SQL.
31. Report 3 should have no library limitations, so it should be visible to all libraries.
32. Go to Saved reports as in Step 2.
33. Confirm you do not see Report 2, and only Report 1 and Report 3.
34. In the upper right corner, click the drop down that says koha Centerville and click Set library to change your library.
35. Set your library to Fairfield.
36. Go to Saved reports as in Step 2.
37. Confirm you do not see Report 1, and only Report 2 and Report 3.

Verify Disabling LimitReportsByBranch Preference Shows All Reports
38. Disable LimitReportsByBranch preference as in steps 13 to 15.
39. Go to Saved reports as in Step 2.
40. Confirm Report 1, Report 2, Report 3 are visible.
41. Click to edit Report 1 and verify there is no Library limitation select box.

Verify Library limitations are Persisted When EnableFilteringReports is Toggled On or Off
42. Enable LimitReportsByBranch preference as in steps 13 to 15.
43. Ensure your library is set to Fairfield as in step 35.
44. Go to Saved reports as in Step 2.
45. Confirm Report 1 is not visible, and Report 2 and Report 3 are visible.
46. Click to edit Report 2 and verify the Library limitation select box is at the bottom of the page and that it has Fairfield selected.

Verify the Show all reports option shows all reports for users with the Manage Report Limits permission and superlibrarians
47. Go to Saved reports as in Step 2 and in the Show reports dropdown, select Show all reports, and click Apply filter.
48. Confirm the page reloads with all reports visible: Report 1, Report 2, and Report 3 should be visible.
49. Select Show my branch reports from the dropdown and click Apply filter.
50. Confirm Report 1 is not visible, and Report 2 and Report 3 are visible (you should only see reports for your branch, Fairfield).

Verify Report filters return the correct results
51. Go to Saved reports as in Step 2.
52. Verify you're viewing only your branch's reports in the filter.
53. Under Filter in the left sidebar, type "2" in the Keyword field and click Apply filter.
54. Confirm only Report 2 is visible.
55. Under Filter in the left sidebar, type "1" in the Keyword field and click Apply filter.
56. Confirm there are no reports visible, and the message "No saved reports match your criteria" is displayed.

Verify Library Limits column is available to superlibrarians and users with the Manage Report Limits permission
57. Go to Saved reports as in Step 2.
58. Click the Columns dropdown and ensure that the Library limits column is available to select for display. Select it.
59. Confirm that the Library limits column is now visible in the list of reports and that it shows the correct library limitations for each report (e.g., Report 1 should show 1 library limitation and Centerville (CPL) on hover, Report 2 should show 1 library limitation and Fairfield (FFL) on hover, and Report 3 should show no limitation).

Verify the Show all reports and Limit reports options are available to users that are not superlibrarian but have the Manage Report Limits permission
60. For the StaffReportLimitUser, add the permission for Manage Report Limits as described in steps 9 to 12. This will allow this user to see the Show all reports and Limit reports options.
61. Log out of the koha admin account. In the upper right corner, click the drop down that says koha Fairfield and click Log out.
62. Log in as StaffReportLimitUser, the previously created staff user with report permissions.
63. Confirm the staff user's library is Centerville in the upper right corner of the screen.
64. Go to Saved reports as in Step 2.
65. Confirm the filter option for Show reports is visible.
66. Click to edit Report 1.
67. Verify there is a Library limitation select box and that it can be interacted with.

Verify the Show all reports and Limit reports options are not available to users that are not superlibrarian and do not have the Manage Report Limits permission
68. Log out of the StaffReportLimitUser account.
69. Log in as StaffNoLimitPermission, the previously created staff user without the Manage Report Limits permission.
70. Confirm the staff user's library is Fairfield in the upper right corner of the screen.
71. Go to Saved reports as in Step 2.
72. Click the Columns dropdown and ensure that the Library limits column is not in the list of available columns to select for display.
73. Confirm the filter option for Show reports is not available.
74. Click to edit Report 2.
75. Verify there is no Library limitation select box at the bottom of the page.

[NEW] Verify library limits are auto-assigned and preserved correctly for non-permissioned users
76. Still logged in as StaffNoLimitPermission (Fairfield) from the previous section. Go to Saved reports and click New report. Enter "Limit Auto-Assign Test" as the report name and SELECT 1 as the SQL. Confirm there is no Library limitations select box visible on the form. Click Save.
77. Go back to Saved reports. Click Edit for Report 2 (limited to Fairfield). Add `-- test` as a trailing SQL comment and click Update SQL. This simulates a non-permissioned user saving an existing report that already has limits.
78. Go back to Saved reports. Click Edit for Report 3 (no library limits). Add `-- test` as a trailing SQL comment and click Update SQL. This simulates a non-permissioned user saving an existing report that has no limits.
79. Log out and log back in as StaffReportLimitUser (Centerville, has manage_report_limits).
80. Go to Saved reports. Use Show all reports if needed. Find "Limit Auto-Assign Test" and click Edit. Confirm the Library limitations select box shows Fairfield as the only selected library — the report was automatically limited to the creator's home library on create.
81. Find Report 2 and click Edit. Confirm the Library limitations select box still shows only Fairfield — the existing limit was preserved when the non-permissioned user saved the report.
82. Find Report 3 and click Edit. Confirm the Library limitations select box is empty — no limits were introduced when the non-permissioned user saved a report that had no existing limits.

Verify limited reports are not visible to users without permissions
83. While still logged in as StaffReportLimitUser from step 79, copy the URL for the edit page of Report 1.
84. Log out of the StaffReportLimitUser account.
85. Log in as StaffNoLimitPermission, the user without the Manage Report Limits permission.
86. Paste the copied URL for the edit page of Report 1 into the browser and navigate to it.
87. Confirm that you see an error message that says "This report is restricted and cannot be accessed by the current user." and that the page does not load the report details.

Run Unit Tests
88. Using Koha Testing Docker, in the Koha home directory run the command: ktd --shell to start the ktd shell.
89. Run command: reset_all to drop and recreate the koha database.
90. Run command prove t/db_dependent/Koha/Reports.t to run the test.
91. This file contains the unit tests for the reports_branches table and the new subtest `library limits enforcement on save and update`, which covers auto-assignment of branch limits on create and preservation of limits on update for non-permissioned users.
92. All tests should pass.
93. Run command prove t/Koha/Auth/Permissions.t
94. Permissions unit tests in this file were updated.
95. All tests should pass.
96. Run command prove t/db_dependent/Reports/Guided.t
97. The Guided report tests were updated to account for the new library limitations and permissions.
98. All tests should pass.

Signoff
99. Sign off if the steps above check out.

Sponsored-by: Ramapo Catskill Library System
Co-authored-by: Casey Conlin <casey.conlin@gmail.com>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-28 14:32:25 +00:00
Martin Renvoize c7673a9d6a
Bug 41898: Introduce 'issued' status and update booking display/filtering
Implements a 4-state booking lifecycle: new → issued (on checkout) →
completed (on return), plus cancelled at any point.

Backend changes:
- AddIssue sets booking status to 'issued' (was incorrectly 'completed')
- AddReturn transitions 'issued' → 'completed' via booking_id on the issue
- filter_by_active updated to status-based: status IN ('new', 'issued');
  previously it filtered by date range — active/inactive now reflect booking
  lifecycle rather than the current date relative to start/end dates
- _is_final_status_transition reverted to only skip clash detection for
  terminal statuses 'cancelled' and 'completed'; 'issued' is active and does
  not bypass clash detection
- GET /api/v1/bookings no longer pre-filters to active bookings server-side;
  callers must supply an explicit status filter if they need active-only

Display changes:
- Patron bookings tab: replaces the date-based expired/active toggle with
  per-status filters (completed, cancelled) using the AdditionalFilters
  framework; active bookings (new/issued) are shown by default
- Biblio bookings list: same status-based filters; removes the date-based
  expired filter that was still present
- Status column is always visible on both views (was previously hidden on
  the patron tab unless expired bookings were shown)
- Status badges: new=bg-success, issued=bg-info, completed/cancelled=bg-secondary
- Timeline isActive check corrected to ['new','issued']
- patron-detail-tabs.inc: rename expired_bookings_count → closed_bookings_count
  to reflect status-based (not date-based) counting
- Filter button colour fixed to use $link-color so both views are consistent

Test plan:
1. Enable the EnableBookings system preference.
2. Create a biblio with at least one bookable item.
3. Place a booking for a patron via the biblio's Bookings tab.
   - The booking should appear with status badge "New" (green).
4. Check out the booked item to that patron (Circulation → Check out).
   - Reload the Bookings tab; the booking should now show "Issued" (blue).
5. Return the item (Circulation → Check in).
   - Reload the Bookings tab; the booking should now show "Completed" (grey).
6. Place a second booking and cancel it from the Bookings tab Actions menu.
   - The booking should show "Cancelled" (grey), with the reason if provided.
7. On the biblio Bookings tab:
   - Completed and cancelled bookings are hidden by default.
   - Clicking "Include completed" shows completed bookings.
   - Clicking "Include cancelled" shows cancelled bookings.
   - Both can be toggled independently.
   - The Status column is always visible.
8. Navigate to the patron's detail page → Bookings tab.
   - Active bookings (new/issued) are shown by default.
   - Completed and cancelled can be toggled independently using the same
     filter buttons.
   - The Status column is always visible.
9. Confirm via the REST API that GET /api/v1/bookings (no filters) returns
   bookings of all statuses, not just active ones.

Sponsored-by: OpenFifth <https://openfifth.co.uk/>
Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-07-27 15:53:33 +00:00
Saiful Amin 4c255bdde8
Bug 29587: Test mail option in SMTP servers
Edit: Added CSRF protection.

This patch adds a "Send test email" action to the SMTP servers
administration page. It sends a test message to the address in
the KohaAdminEmailAddress system preference and reports success
or failure to the user.

Test plan:
1. Add a valid SMTP server in Administration → SMTP servers.
2. Set KohaAdminEmailAddress to a valid email address.
3. Apply the patch.
4. Click "Send test email" in the Actions column.
5. Confirm that Koha reports "Test email sent successfully".
6. Edit the SMTP server and change the domain to an invalid one.
7. Click "Send test email" again.
8. Confirm that Koha reports failure.
9. Sign off.

Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-15 15:24:04 +00:00
Martin Renvoize 04809de849
Bug 42764: Fix spelling errors across the codebase
Correct genuine spelling errors identified by the codespell 2.4.x
full scan after the KTD container OS upgrade. Changes are in
comments, POD, strings, and template text across 55 files.

"SAN Ouest Provence" (the French library co-operative and Koha
sponsor) is preserved as a proper noun. Perl copyright lines
receive an inline # codespell:ignore annotation; about.tt files
(contributor attribution pages) are added to the Koha::Devel::Files
codespell exception list so that future uses of "Provence" as a
typo for "Province" are still caught in all other files.

Notable user-visible fixes:
- "submiting" -> "submitting" in authority and bibliographic merge screens
- "deleteable" -> "deletable" in patron exception messages
- "Acquistions" -> "Acquisitions" in reports dictionary

Test plan:
1. Apply patches
2. In the staff interface, go to Cataloguing > Merge records and
   confirm the submit button reads "Submitting" (not "Submiting")
3. In the staff interface, go to Authorities > Merge and confirm
   the same correction
4. Attempt to delete a patron with outstanding issues and confirm
   the error message reads "deletable" (not "deleteable")
5. prove xt/author/codespell.t
=> All tests pass

Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-06-03 16:09:04 +00:00
Brendan Lawlor 04a48349be
Bug 32773: Add ability to set biblio_framework.is_fast_add
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Miranda Nero <mnero@oslri.net>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 16:05:35 -06:00
Pedro Amorim bbc4e8050d
Bug 37762: (QA follow-up): Add filters to supply ILL table
Also fix table_settings

Signed-off-by: Jason Robb <jrobb@sekls.org>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-08 12:25:51 -06:00
Matt Blenkinsop bce9aad974
Bug 26355: (follow-up) Fix handling of extended attributes
Extended attributes weren't being identified as changes and so need to be checked to see if any of them have changed

Sponsored-by: Westminster City Council <https://www.westminster.gov.uk/>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:30:04 -06:00
Matt Blenkinsop cb9e70f8c2
Bug 26355: (follow-up) Allow the setting of multiple information messages
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:30:02 -06:00
Matt Blenkinsop 4979f0aead
Bug 26355: Add the new category fields to the UI
Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-05-01 09:29:59 -06:00
Martin Renvoize 8f6daa1b38
Bug 34353: (QA follow-up) Migrate spinelabel for both holdings tables
The catalogue_detail.inc include is shared by both the holdings_table
and otherholdings_table tabs, so the column visibility migration must
seed both. Without this, sites that previously had
'SpineLabelShowPrintOnBibDetails' set to "Don't show" would still see
the spine-label column appear in the other-holdings tab.

Also mark 'spinelabel' as is_hidden by default in admin/columns_settings.yml
for both tables, so fresh installs (where the atomicupdate doesn't run)
match the previous syspref default of 0 (Don't show).

Test plan:
1. Reset the database, do not apply the parent patch yet.
2. With the syspref still present, set it to "Don't show" and save.
3. Apply the parent patch and this follow-up, then update the database.
4. Navigate to a record with items in both 'Holdings' and 'Other holdings'
   tabs.
5. Verify the 'Spine label' column is hidden in BOTH tabs.
6. Reset the database again. Set the syspref to "Show", save, then apply
   patches and update the database.
7. Verify the 'Spine label' column is visible in BOTH tabs.

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-29 09:09:28 -06:00
Martin Renvoize adc1651a52
Bug 39516: Display composite match scores in staged batch view
Adds a new "Score breakdown" column to the staged MARC batch view that
shows the per-matchpoint score contributions for each candidate match,
e.g. "title:50, author:50" or "isbn:100", rather than a single opaque
total.

The column is hidden by default and can be toggled via the standard
column configuration tool (Administration > Table settings > Tools >
manage-marc-import). The existing "Match details" column continues to
show the numeric total score unchanged.

Falls back to displaying the raw aggregate score for any pre-existing
import_record_matches rows that have no composite_scores data.

To test:
1. Ensure you have a bibliographic matching rule with at least two
   matchpoints, e.g.:
     - Match point: search index "title",  score 50, tag 245$a
     - Match point: search index "author", score 50, tag 100$a
     - Match point: search index "isbn",   score 100, tag 020$a
   Set the threshold to 100.
2. Prepare two MARC files:
   a. A record that matches an existing catalogue entry via title + author
      (but not ISBN).
   b. A record that matches solely via ISBN.
3. Stage each file via Tools > Stage MARC records for import, applying
   the matching rule above.
4. Open the staged batch view for each batch.
5. Confirm the "Match details" column still shows the total numeric score
   as before, e.g. "(score=100)".
6. Use the column visibility toggle (or Administration > Table settings >
   Tools > manage-marc-import) to show the "Score breakdown" column.
7. Verify the breakdown column shows:
   a. File (a): "title:50, author:50"
   b. File (b): "isbn:100"
8. Confirm the "Score breakdown" column is hidden by default and the
   column toggle persists across page reloads.
9. Verify that pre-existing staged batches (run before this patch) still
   display gracefully — the breakdown column falls back to the numeric
   score.

Sponsored-by: Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-29 09:09:23 -06:00
Lucas Gass cc3b7cebf5
Bug 41882: Enforce pickup location rules
To test:
1- Set ReservesControlBranch to 'item's home library'
2- Set Main library's 'Holds and bookings policies by item type' so that PASS items can only be picked up at Main
3- Place a hold on a bib whose only item is a PASS belonging to Main
4- Use the Batch hold modification tool to identify the hold you just placed
5- Update the pickup location to North. Note that the update is successful, and there's no indication that the pickup location is now a problem.
6- Check in Main's PASS, and note that the hold doesn't trigger to fill
7- APPLY PATCH, restart_all
8- Try again, this time the hold should fail to update at all.
9- You should see a new table with the 'Failed hold' in it, it should also include a 'Result' column which explains why the hold failed (New pickup location is invalid).
10- Try modifying a hold to an invalid pickup location, but also attempt to modify something else on the hold at the same time, like expiration date.
11- The hold should not modify anything. If the pickup location is invalid all other modifications should NOT happen on that hold.
12 - Play with the Table settings for the holds_modified tables, ensuring you can hide/show all the columns.

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-04-29 09:09:20 -06:00
Nick Clemens 88cfb35e5e
Bug 42156: Add a stdno index for authid
In order to allow matching on authid we need a search index with a ci_raw
field

local-number is indexed as a number, and needed that way for sorting. This adds
a stdno version of 001 as authid

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>
2026-04-23 09:25:03 -06:00
Janusz Kaczmarek 95267338d5
Bug 42016: Add identifier-other search field for authorities (MARC 21)
MARC 21 authority records often have 024 $a (Other Standard
Identifier) - https://www.loc.gov/marc/authority/ad024.html,
but the field 024 is missing from ES search fields and the record
cannot be found with these identifiers.

Test plan
=========
1. Have a ktd instance with Elasticsearch.
2. Add a 024 field to an authority record, i.e. for Alatriste, Gustavo:
   024 7# $a 86971927 $7 viaf
3. In Authorities, make an 'Entire record' search for the added
   identifier. You should get no results.
4. Apply the patch, reindex with:
   sudo koha-elasticsearch --rebuild -r -d -a kohadev
5. Repeat p. 3. You should now be able to find the record.

Sponsored-by: Pontificia Università di San Tommaso d'Aquino (Angelicum)
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 14:10:07 -06:00
Julian Maurice e7f483def5
Bug 38136: Refactor database translations (alternative)
This has the same goals of bug 24975 but with a different approach.

Bug 24975 tried the "POT/PO files as database tables" approach but
it appeared that is not what best fits our needs.

Instead of a "source text / translated text" mapping, we need
translations to be attached to a specific "object" (or table row), which
has the added benefit of keeping translations unaffected when the
original string changes. It may or may not be what you want but at least
this avoids the problem where fixing an error in the original string
forces users to re-translate everything.

We also need to be able to translate all translatable properties of a
particular entity.

The solution proposed here is to add a DBIC component that will add
several DBIC relations to the `localization` table:
* a relation named `localizations` that will return all translations for
  all translatable properties for all languages.
* for each translatable property:
  * a relation named `{$property}_localizations` that will return all
    translations for a given property, for all languages
  * a relation named `{$property}_localization` that will return the
    translation for a given property, for the current language

To enable translations for a particular entity, we will need to:
* add two method calls in the "result class" corresponding to the
  localizable object type
* in the admin interface, add a link to the the translation popup.
  Unlike bug 24975 there is not a page where you can translate
  everything. I don't know if it is really useful (probably better to
  translate itemtypes when you are on the itemtype page). It can be
  added later if needed.

To give an example, this is what needs to be added manually in
Koha/Schema/Result/Itemtype.pm:

    __PACKAGE__->load_components('+Koha::DBIx::Class::Localization');
    __PACKAGE__->localization_add_relationships(
        'itemtype', # the PK column
        'description' # a list of translatable columns
    );

(see POD in Koha/Schema/Component/Localization.pm for more information)

Final notes:
* I wanted this patch to have as few changes as possible so I kept
  methods like `search_with_localization`, `children_with_localization`
  even if I believe they can be removed (replaced by search/children)
  Localizations do not need to be prefetched/joined unless you want to
  sort on them.
  For the same reason, $itemtype->unblessed now always return a
  `translated_description` key.
  This can be fixed in followup patches
* There is cache involved (see
  Koha::Schema::Component::Localization::localization).
  Localizations in cache are grouped by object type and language (keys
  look like 'KOHA:localization:Itemtype:en')
* By keeping a single table for all translations of all entities, we
  cannot have data integrity at the RDBMS level, but automatic deletion
  of translations is handled by the DBIC `cascade_delete` feature, so
  integrity should be fine as long as no raw SQL update/delete operation
  is involved.

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-15 11:37:14 -06:00
Nick Clemens 876869544f
Bug 41267: Add fill_other_biblio_holds_policy circulation rule
This patch adds a new rule for itemtypes to allow/prevent filling other holds on a bibliographic record
The rule will obey ReservesControlBranch for determining the rules

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

Signed-off-by: Andrew Auld <andrew.auld@openfifth.co.uk>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-04-09 08:27:26 -06:00
Tomás Cohen Arazi 3c87468669
Bug 40841: Add limits configuration UI
This patch adds branch limits selection to the Z30.50/SRU configuration
page.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:28 +01:00
Pedro Amorim ade2934e2a
Bug 40504: Add 'managedby' to illrequests
This also includes a 'manager' accessor which returns the Koha::Patron
object

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:22 +01:00
Janusz Kaczmarek 71af0f01d1
Bug 41758: Add Fingerprint Identifier data to Elasticsearch index mappings
Libraries cataloguing older monographic resources request fingerprint indexing.

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

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

Sponsored-by: Ignatianum University in Cracow
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 14:21:17 +01:00
Martin Renvoize 6aff5f361a
Bug 35380: (QA follow-up) Minor code quality fixes
- Add order_by => ['name'] to record_sources fetch in marc-overlay-rules.pl
  so filter dropdown options are consistently sorted
- Add COMMENT to record_sources.is_system column in kohastructure.sql
  to match convention of other columns in that table
- Remove commented-out Data::Dumper debug lines from biblios.t
- Remove redundant explicit object deletes inside subtests that are
  already wrapped in txn_rollback; the rollback undoes them anyway

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:50:53 +01:00
Jan Kissig 246f299df1
Bug 35380: Make record sources available in overlay rules
This patch enhances the filters in record overlay rules when using the "Source" module. The available filter values are now system defined in Administration -> Record sources and can be extended by own record souces. The former hard coded values (f.e. batchmod, intranet) are added to the database and cannot be deleted.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-26 09:50:08 +01:00
Johanna Räisä b58f945270
Bug 23269: use REST API for patron_holds_table
This patch uses the REST API to populate the holds table

Test plan:
1) Apply the patch
2) Go to a record with holds
3) Check that the holds table is populated correctly
4) Check that hold tables functions work correctly
5) Change HoldsSplitQueue and HoldsSplitQueueNumbering system preference, try all variations
6) Repeat steps 3 and 4
7) Search for records and place holds to multiple records
8) Repeat steps 3 and 4
9) Try with lesser permissions

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-03-21 20:28:14 +00:00
Owen Leonard 713cae3a49
Bug 41126: Move shelving location into a separate column in inventory
This patch updates the inventory template so that items' shelving
location is showin in its own column in the table of results. This makes
it consisten with other displays like the bibliographic detail holdings
table and the holds queue report.

To test, apply the patch and restart services.

- If necessary, modify a few items to add a shelving location.
- Go to Cataloging -> Inventory
- To narrow down the results, I used the item call number fields under
  "Item location filters."
- Submit the form.
- In the list of results, confirm that there is a separate column for
  shelving location and that the correct information is displayed.
- Confirm that the column visibility menu works to show and hide the
  column.
- Go to Administration -> Table settings -> Tools (sic) -> Inventory
- Confirm that there is a checkbox for the shelving location column and
  that your changes to the column's configuration are reflected in the
  inventory results.
  - Because of DataTables state saving feature you might have to clear
    your browser's local storage in order to see the new column
    configuration.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:34:02 -07:00
Owen Leonard 0ddcaa5e8a
Bug 41134: Add table settings to transfers
This patch updates the transfers page in order to add table settings to
the table of transfered items.

The patch also makes another minor correction: The transfer submit
button now has the standard class "btn-primary."

To test, apply the patch and restart services.

- Go to Circulation -> Transfer.
- Submit a barcode from a library other than your own so that the
  transfer will complete successfully.
  - Note that the "Transfer" button has the standard primary yellow
    color.
- In the table of transferred items you should see the columns setting
  menu, export option, etc. Confirm that these controls work correctly.
- Go to Administration -> Table settings -> Circulation -> Transfers
- Make some changes to the column visibility settings and return
  to the transfers page to confirm that your settings are now
  applied when you transfer more items.
  - Because of DataTables state saving feature you might have to clear
    your browser's local storage in order to see the new column
    configuration.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:43 -07:00
Nick Clemens f4634ee1c8
Bug 36506: Remove process fee from itemtype administration
Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:45 -07:00
Nick Clemens 8d6391d3f0
Bug 36506: Add lost_item_processing_fee rule and CRUD
Sponsored-by: The Main Library Alliance <https://www.mainlib.org/>
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:44 -07:00
Wainui Witika-Park f2dbadd52a
Bug 36853: Enhance Elasticsearch Notes/Comments MARC21 index mappings
Added the following tags and subfields to the existing note index for Elasticsearch MARC21, as used by the "Notes/Comments" advanced search dropdown option: 501a, 503a, 504a, 508a, 511a, 521a, 538a, 547a

Sponsored-by: Educational Services Australia SCIS
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:40 -07:00
David Cook 6da9009b3a
Bug 38946: Add enumchron to inventory table
This patch adds "Serial enumeration / chronology" to the inventory table
output.

Test plan:
0. Apply the patch
1. Go to http://localhost:8081/cgi-bin/koha/tools/inventory.pl
2. Click "Submit"
3. Note that a "Serial enumeration / chronology" column appears in
the results
4. For the top result, go into the bib record and then add a "Serial enumeration /
chronology" to the item in question
5. Re-run the inventory
6. Note that the "Serial enumeration / chronology" now has a value in iy
7. Click "Columns" and hide the column
8. Try again using the CSV export and note that the new column appears again

Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:33 -07:00
Nick Clemens 4c82ff273b
Bug 41131: Don't allow limiting transfers from/to a single branch
We say that you cannot limit transfers internally within a branch, but
it seems we do allow you to, and don't show you when we do

To test:
1 - Go to Admin->Library transfer limits
2 - On a branches page, uncheck the box for that branch
    e.g. don't allow FIC to transfer to CPL from CPL
3 - Save
4 - Note the box is still checked
5 - Check the DB
    SELECT * FROM branch_transfer_limits;
6 - There is a line to/from CPL!
7 - Apply patches
8 - updatedatabase
9 - Repeat 5 - the line is deleted!
10 - Try to create the rule again, not the box is now disabled
11 - Be sneaky, enable the box, uncheck it and save, no rule created
12 - Be sneaky, edit the HMTL for another button to make it limiting CPL to CPL, save, no rule created
13 - Sign off

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-26 09:04:19 -07:00
Nick Clemens 7cdb17cc2f
Bug 38384: (follow-up) move require Koha::Plugins to use
remaning ocurrences in test files seem okay, this covers the others

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-25 07:37:00 -07:00
Martin Renvoize 3ee2efa9d0
Bug 28530: (QA follow-up) Use DBIC in controller
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:41 -07:00
Lucas Gass 336d48eae2
Bug 28530: Fix forbidden http pattern
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:38 -07:00
Lucas Gass 1f63d8c13f
Bug 28530: Implement float limits
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:35 -07:00
Kyle M Hall be2cbf15de
Bug 28530: Add float limits editor
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Kris Becker <kbecker@jcls.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:34 -07:00
Martin Renvoize a92e6ef8ea
Bug 41798: Fix FTP passive mode not saving and add display indicator
The FTP passive mode setting was not being saved due to a typo in the
parameter name ('passiv' instead of 'passive'). This fixes the typo
and adds display of passive mode status in the transports table.

Test plan:
1. Go to Administration > File transports
2. Click "New file transport"
3. Fill in the name (e.g., "Test FTP")
4. Change Transport to "FTP"
5. Set Passive mode to "Enabled (Recommended)"
6. Fill in required fields (host, username, etc.) and save
7. Edit the transport you just created
8. Verify Passive mode is still set to "Enabled" (not reverted to Disabled)
9. Return to the file transports list
10. Verify the Transport column shows "FTP (passive)" for this transport
11. Edit the transport and change Passive mode to "Disabled"
12. Save and return to the list
13. Verify the Transport column now shows just "FTP" (without the passive indicator)

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:21 -07:00
Martin Renvoize d5f9858307
Bug 3492: Remove from patron categories admin
Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:56 -07:00
Martin Renvoize 35c7f0a7c4
Bug 3492: Add hold fees to circulation rules system
This commit integrates hold fee configuration into the main circulation
rules system, providing granular control over hold fees based on patron
category, item type, and branch combinations.

Changes:
- Add hold_fee as a new circulation rule type with full scope support
- Remove deprecated reservefee column mapping from Koha::Patron::Category
- Integrate hold fee input into the circulation rules admin interface
- Add hold fee column to the main circulation rules matrix
- Enable proper rule hierarchy resolution for hold fees

Hold fees can now be configured at multiple levels with automatic
fallback handling following standard circulation rule patterns.

Sponsored-by: OpenFifth <https://openfifth.co.uk>
Signed-off-by: Jackie Usher <jackie.usher@westsussex.gov.uk>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:55 -07:00
Martin Renvoize 1f51dab88e
Bug 41268: (QA follow-up) Apply same simplification to remaining operations
This follow-up applies the same variable-based simplification pattern
to the remaining operations in smart-rules.pl:

- cud-set-branch-defaults: 2 code paths reduced to 1
- cud-add-branch-cat: 4 code paths reduced to 1
- cud-add-open-article-requests-limit: 4 code paths reduced to 1
- cud-del-open-article-requests-limit: 4 code paths reduced to 1
- cud-add-branch-item: 4 code paths reduced to 1

Note: cud-delete-branch-cat was NOT simplified because it contains
additional business logic (setting itemtype rules only when deleting
the default categorycode), which is not simply a matter of converting
'*' to undef.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Nick Clemens e9d675fcbc
Bug 41268: Use variables rather than conditionals
Testing plan:

- Apply patch
- Run tests
- Go to admin > circ and fine rules
- Create a few Holds and bookings policies
  - For All Libraries
  - For a specific library
- Delete the policies
- (optional) a simple `SELECT * FROM circulation_rules` can confirm policies were created/deleted correctly

Signed-off-by: Eric Phetteplace <ephetteplace@cca.edu>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:18 -07:00
Fridolin Somers 15f21656fe
Bug 41043: Use op 'add_form' and 'edit_form' in z3950 servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/z3950servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new z3950 server
2) Enter mandatory datas in form and save
3) Edit this server
4) Copy this server
5) Repeat 1 to 4 for a SRU server

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:12 -07:00
Fridolin Somers d0cdf16a45
Bug 41043: Use op 'add_form' and 'edit_form' in oai servers
Since CSRF protection, 'op' arg for creating/editing an object uses add_form and edit_form.
This is missing only in admin/oai_servers.pl

This patch also removes TT variable add_form to avoid confusion

Test plan :
1) Create a new OAI repository
2) Enter mandatory datas in form and save
3) Edit this repository
4) Copy this repository

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:11 -07:00
Lucas Gass 3b149f0f50
Bug 33544: (RM follow-up) Add new line
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:05 -07:00
Martin Renvoize 9954466c10
Bug 33544: Move biblio ID into title link
This patch removes the separate biblio_id column and instead embeds
the biblio link directly within the title field of the details column,
reducing table width while maintaining access to the full record.

Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:04 -07:00