Commit Graph

3344 Commits

Author SHA1 Message Date
Lucas Gass c88a86d0af
Bug 23260: DBRev 25.12.00.028
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:51 -07:00
Lucas Gass 2d75cac7d1
Bug 23260: Fix database update
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:49 -07:00
Lucas Gass 9165c0fa4b
Bug 23260: Fix DB update to NOT allow for NULL borrowernumber
Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:47 -07:00
Nick Clemens ab5efb97a4
Bug 23260: Database updates and new system preferences AnonymizeLastBorrower / AnonymizeLastBorrowerDays
This patch alters the items_last_borrowers table to allow for NULL borrowers

It also adds two new system preferences to allow controlling the anonymization of items_last_borrower data

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Peter Moore <peter@mrcpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:44 -07:00
Lucas Gass d7aae3632e
Bug 39698: DBRev 25.12.00.027
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:43 -07:00
Jake Deery 5b59301de2
Bug 39698: Add option to expand responsive datatable
This patch adds the 'OPACTableColExpandedByDefault' system preference,
disabled by default, which controls whether responsive datatable rows
are expanded or not. This work has been performed after recommendations
from a recent accessibility audit.

TO TEST:
a)  set 'OpacLocationBranchToDisplay' to both
b)  search the OPAC for history, select first result
c)  zoom your browser in to maxiumum, scroll down to holdings table
    -   notice how the rows are collapsed by default, with '+' visible
**apply patch**
e)  refresh details page, notice how the behaviour is currently unchanged
f)  change new 'OPACTableColExpandedByDefault' syspref to 'Expand'
g)  return to OPAC details page, refresh, zoom in
    -  notice how the rows are now expanded by default, with '-' visible
**sign off**

Sponsored-by: British Museum
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-03-05 08:33:42 -07:00
Lucas Gass 9fa84c7fd4
Bug 36506: DBRev 25.12.00.026
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-27 11:38:48 -07:00
Nick Clemens 5ea97b7dd5
Bug 36506: Database update
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
Lucas Gass 36997e5493
Bug 41131: DBRev 25.12.00.025
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-26 09:04:19 -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
Lucas Gass d427bd25c9
Bug 28530: DBRev 25.12.00.024
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:44 -07:00
Martin Renvoize 30fd316872
Bug 28530: (QA follow-up) Add POD documentation and database index
- Add comprehensive POD documentation for lowest_ratio_library() method
  including parameter descriptions, return values, and algorithm explanation
- Add database index on itemtype column in library_float_limits table
  to improve query performance when searching by itemtype

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-10 10:51:42 -07:00
Kyle M Hall cababbbd87
Bug 28530: Update database, add new schema file
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:33 -07:00
Lucas Gass 35154d19e1
Bug 3492: DBRev 25.12.00.023
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 12:57:57 -07:00
Martin Renvoize f1b20b645c
Bug 3492: Modernize hold fee system and migrate to circulation rules
This commit completely modernizes the hold fee system by migrating from
the deprecated categories.reservefee column to the circulation rules framework
and implementing modern Koha::Objects patterns.

WHAT CHANGED:

1. MIGRATION TO CIRCULATION RULES:
   - Moved hold fees from categories.reservefee to circulation_rules table
   - Added database migration script with atomic update
   - Maintains existing fee amounts during migration
   - Provides rule hierarchy: category+itemtype+branch specific rules

2. NEW SYSTEM PREFERENCE: TitleHoldFeeStrategy
   - Options: highest, lowest, most_common
   - Addresses inconsistent title-level hold fees when items have different fees
   - Default: 'highest' (safest approach for library revenue)

3. MODERN Koha::Objects API:
   - Koha::Item->holds_fee($patron): Calculate fee for specific item
   - Koha::Hold->calculate_hold_fee(): Enhanced item/title-level logic
   - Koha::Hold->should_charge($stage): Centralized charging logic
   - Koha::Hold->charge_hold_fee(): Modern fee charging with proper accounting
   - Removed C4::Reserves::GetReserveFee and ChargeReserveFee

4. ENHANCED FUNCTIONALITY:
   - Proper ReservesControlBranch logic (patron home vs item home library)
   - Complete HoldFeeMode implementation (placement/collection/not_always)
   - Clear OPAC messaging with "You will be charged..." commitment
   - Comprehensive test coverage for all fee scenarios

5. TECHNICAL IMPROVEMENTS:
   - Object-oriented design following Koha patterns
   - Proper error handling and edge case management
   - Modern test structure with comprehensive coverage
   - Clean separation between fee calculation and charging

TEST PLAN:

A) MIGRATION AND SETUP:
   1. Apply all patches and run database update
   2. Verify existing hold fees migrated to circulation rules:
      - Administration > Circulation and fine rules
      - Previous categories.reservefee values now in "Hold fee" column
   3. Confirm old categories.reservefee column no longer used

B) BASIC FEE CALCULATION:
   1. Set up patron categories with different hold fees in circulation rules
   2. Create items with different item types, each with different hold fees
   3. Test item-level holds charge correct fees based on specific item
   4. Test title-level holds use TitleHoldFeeStrategy preference

C) TITLE-LEVEL HOLD STRATEGIES:
   1. Set TitleHoldFeeStrategy to "highest":
      - Create title with items having fees $1.00, $2.00, $3.00
      - Verify title-level holds charge $3.00
   2. Set TitleHoldFeeStrategy to "lowest":
      - Verify same title charges $1.00
   3. Set TitleHoldFeeStrategy to "most_common":
      - Add multiple items with $2.00 fee
      - Verify title-level holds charge $2.00 (most common)

D) HOLDFEEMODE PREFERENCES:
   1. Set HoldFeeMode to "any_time_is_placed":
      - Place holds and verify immediate fee charging
      - Check patron account for correct hold fee debits
   2. Set HoldFeeMode to "any_time_is_collected":
      - Place holds, verify no immediate charges
      - Check out items to patron, verify fee charged on collection
   3. Set HoldFeeMode to "not_always":
      - With available items: verify no fee charged
      - With all items checked out but no other holds: verify no fee
      - With all items checked out and other holds exist: verify fee charged

E) RULE HIERARCHY TESTING:
   1. Set different fees for different category/itemtype/branch combinations
   2. Verify most specific rule applies:
      - Branch + Category + ItemType (most specific)
      - Category + ItemType
      - Category only (most general)
   3. Test with different patron categories and item types

F) USER INTERFACE TESTING:
   1. OPAC interface:
      - Verify "You will be charged..." messages display correct amounts
      - Test both item-level and title-level hold fee messages
      - Confirm fees match actual charges in patron account
   2. Staff interface:
      - Place holds for patrons and verify fee calculations
      - Check Administration > Circulation rules interface works correctly

G) EDGE CASES AND ERROR HANDLING:
   1. Test $0.00 fees (no charge scenarios)
   2. Test patrons with no applicable fee rules (should default to $0.00)
   3. Test items with no holdable copies (should return $0.00)
   4. Test invalid/missing itemtypes or categories
   5. Test holds on biblios with no items

H) REGRESSION TESTING:
   1. Verify existing hold placement workflows unchanged
   2. Check patron account charging remains accurate
   3. Confirm OPAC and staff interfaces display correctly
   4. Test that existing holds continue to work properly

I) UNIT TESTS:
   Run the following test suites to verify functionality:
   - prove t/db_dependent/Koha/Hold.t
   - prove t/db_dependent/Koha/Item.t
   - prove t/db_dependent/Reserves.t
   - prove t/db_dependent/Circulation.t

BACKWARDS COMPATIBILITY:
- All existing functionality preserved
- Hold fee amounts maintained during migration
- Existing workflows continue unchanged
- Legacy code updated to use new API seamlessly

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 f5bc5be08d
Bug 3492: Database migration for hold fees to circulation rules
This commit adds the database migration to move hold fee configuration
from patron categories to circulation rules, providing more granular
control over hold fees based on patron category, item type, and branch.

The migration:
- Creates circulation rules for existing categories.reservefee values
- Removes the deprecated reservefee column from categories table

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:48 -07:00
Lucas Gass 977a8be9eb
Bug 41624: DBRev 25.12.00.022
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:22 -07:00
Jonathan Druart 58baeec11f
Bug 41624: Simplify db rev
Also fix QA failures:
[FAIL] installer/data/mysql/atomicupdate/bug_41624.pl
   FAIL   file_permissions
                File must have the exec flag
   FAIL   forbidden_patterns
                forbidden pattern: trailing space char (line 13)

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:22 -07:00
Lucas Gass 05d08e0ea4
Bug 41624: Revert bug 35211
Bug 41624: Revert "Bug 35211: (QA follow-up) Fix counting"

This reverts commit 97a022054d.

Bug 41624: Revert "Bug 35211: (QA follow-up) fix display of other results tab and move template toolkit logic outside of script array"

This reverts commit c4c2a4b235.

Bug 41624: Revert "Bug 35211: Removed local items from group tabs and removed group items from other holdings tab"

This reverts commit 124c6c8670.

Bug 41624: Revert "Bug 35211: Fixed group tab item building logic"

This reverts commit 23eb2dbd39.

Bug 41624: Revert "Bug 35211: Fix tab building"

This reverts commit f438535b5c.

Bug 41624: Revert "Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref"

This reverts commit d2a0527d86.

Bug 41624: Revert "Bug 35211: Fixed count on logged in holdings"

This reverts commit 96c7eb3459.

Bug 41624: Revert "Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames"

This reverts commit 5c2b0fd496.

Bug 41624: Revert "Bug 35211: Separate group holdings into individual tabs"

This reverts commit 08045c8009.

Bug 41624: DB update to remove the pref

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-09 08:40:21 -07:00
Lucas Gass b626e4f3bf
Bug 41701: DBRev 25.12.00.021
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:41 -07:00
Owen Leonard eb69c7a735
Bug 41701: Fix definition of OAI-PMH:DeletedRecord preference in sysprefs.sql
This patch updates the definition of the OAI-PMH:DeletedRecord
preference in sysprefs.sql, correcting the switched options and
explanation columns.

To test, apply the patch and run updatedatabase. Check that the database
has been updated correctly:

SELECT `options`, `explanation` FROM `systempreferences` WHERE
`variable` = 'OAI-PMH:DeletedRecord';

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jan Kissig <bibliothek@th-wildau.de>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:40 -07:00
Lucas Gass 6d005fbc0c
Bug 39802: DBRev 25.12.00.020
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:39 -07:00
Nick Clemens 6cf5b8d509
Bug 39802: Atomic update file
Sponsored-by: MAIN Library Alliance
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-06 15:17:38 -07:00
Lucas Gass 61107cbfd4
Bug 36466: DBRev 25.12.00.019
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-02-06 15:17:34 -07:00
Hammat Wele 085c27e41b
Bug 36466: (follow-up) Adding atomicupdate file to fix 0000-00-00 in serial table
WNC amended patch - tidied

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
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:33 -07:00
Lucas Gass 26c8ed7d8f
Bug 30331: DBRev 25.12.00.018
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:23 -07:00
Lucas Gass 15d83804b3
Bug 30331: Rename RenewalPeriodBase as ManualRenewalPeriodBase and add AutomaticRenewalPeriodBase sys pref
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:20 -07:00
Lucas Gass a4208f711b
Bug 40364: DBRev 25.12.00.017
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:18 -07:00
Andrew Fuerste Henry 872fdd01f4
Bug 40364: Correct system preference check in atomicupdate
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:16 -07:00
Andrew Fuerste Henry 360fe6ba9a
Bug 40364: Atomicupdate to add permission
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:15 -07:00
Lucas Gass 650f4ad73d
Bug 32682: DBRev 25.12.00.016
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:14 -07:00
Lucas Gass 48c9bdc86a
Bug 32682: Fix how sys pref is retrived in DB update
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:14 -07:00
David Flater 7caf73d3c5
Bug 32682: Add permission for viewing patron reading history
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-30 10:54:12 -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
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
Tomás Cohen Arazi c435b04a93
Bug 41682: Fix 'cancelation' typo
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:53 -07:00
Tomás Cohen Arazi 0ba2c8350c
Bug 41682: Fix 'integer' vs. 'Integer' inconsistency
There are 72 occurences for the 'Integer' type, and 8 for 'integer'.
Tests fail because of `StoreLastBorrower` already, so fixing them all for good.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:53 -07:00
Tomás Cohen Arazi 8552f04486
Bug 41682: Add ApiKeyLog description
This particular case already introduced discrepancies. Fixing.

Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:52 -07:00
Jonathan Druart 409c804bc1
Bug 41682: Sync DB and sysprefs.sql for new and upgraded installs
This patch removes the discrepancies and put in sync the
systempreferences table for new and upgraded installations.

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

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

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

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-23 11:07:52 -07:00
Lucas Gass 833f370fd5
Bug 26993: DBRev 25.12.00.013
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:05 -07:00
Jonathan Druart aee88e8672
Bug 26993: Use FOREIGN_KEY_CHECKS
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:16:02 -07:00
Lucas Gass 0fc32b7de8
Bug 26993: Database updates
Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 14:15:59 -07:00
Lucas Gass 38c15330f4
Bug 39418: DBRev 25.12.00.012
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:28 -07:00
phette23 26a17774e7
Bug 39418: RDA Carrier, Content, and Media Vocabularies database update
This contains a database update script so that existing Koha instances
also receive authorised values for the RDA vocabularies.

Sponsored-by: California College of the Arts
Signed-off-by: Miranda Nero <mnero@oslri.net>
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-22 10:02:28 -07:00
Lucas Gass ffa5704c95
Bug 40435: DBRev 25.12.00.011
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:24 -07:00
Martin Renvoize cd47fb5ca7
Bug 40435: (follow-up) Change preference type to YesNo
Change FutureHoldsBlockRenewals from type 'Integer' to 'YesNo'
for consistency with other boolean preferences in Koha (e.g.,
AllowHoldDateInFuture, OPACAllowHoldDateInFuture).

While the preference functionally works as Integer due to the
.pref file defining the choices, YesNo is the established
convention for binary system preferences.

Test plan:
1. Apply this patch
2. Run the database update
3. Verify the preference appears correctly in system preferences
4. Verify the preference still functions properly with tests:
   prove t/db_dependent/Circulation.t :: "CanBookBeRenewed | future holds"

Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:24 -07:00
Marcel de Rooy f3978e5b1c
Bug 40435: Database revision
Test plan:
[1] Run install or upgrade (updatedatabase.pl). Verify that pref was added to database.
* perl -MC4::Context -e'print C4::Context->preference('FutureHoldsBlockRenewals'),"\n"'
* You should see a zero printed.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:21 -07:00
Lucas Gass 9f9fe699f3
Bug 38061: DBRev 25.12.00.010
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:20 -07:00
Victor Grousset/tuxayo 00988f4d94
Bug 38061: (QA follow-up): dbrev: print if column already exists
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-01-22 10:02:20 -07:00