Koha-clms/installer/data/mysql
Kyle M Hall 5f4fc10df5
Bug 42988: Update database, set holds_get_captured default to 1
The migration from SIPconfig.xml to the database ( bug 37893 ) leaves
holds_get_captured NULL for any account that didn't define it in the
config file. At SIP checkin an unset holds_get_captured defaults to
on, but the REST API returns NULL boolean columns as false, so the
SIP account editor shows "No" selected. Saving the account without
touching the option then stores 0 and holds are no longer captured
at SIP checkin.

This patch changes the column default to 1 and sets existing NULL
values to 1 so the stored value matches the actual checkin behavior.

Test Plan:
1) If you have no SIP accounts, create one
2) Simulate an account migrated from a SIPconfig.xml that doesn't define holds_get_captured:
   UPDATE sip_accounts SET holds_get_captured = NULL;
3) Edit the account, note "Holds get captured" shows "No" even though
   holds *are* captured at SIP checkin while the value is unset
4) Apply this patch
5) Run updatedatabase.pl
6) SELECT login_id, holds_get_captured FROM sip_accounts;
7) Note holds_get_captured is now 1!
8) Edit the account again, note "Yes" is now selected for "Holds get captured"!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2026-08-11 08:23:40 -06:00
..
atomicupdate Bug 42988: Update database, set holds_get_captured default to 1 2026-08-11 08:23:40 -06:00
db_revs Bug 41084: DBRev 26.05.02.001 2026-08-11 08:23:32 -06:00
en Bug 42518: Capitalization: Refund Payout Receipt 2026-06-10 12:35:45 -06:00
localization Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
mandatory Bug 41084: Add EnableZotero system preference 2026-08-11 08:23:30 -06:00
backfill_statistics.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
kohastructure.sql Bug 42988: Update database, set holds_get_captured default to 1 2026-08-11 08:23:40 -06:00
labels_upgrade.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
needs_update.pl Bug 34088: Move the 'needs update' test to a separate script 2024-09-17 10:48:39 +02:00
patroncards_upgrade.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
update22to30.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
updatedatabase.pl Bug 42374: Restore require Koha::Plugins (instead of use) 2026-05-01 11:04:32 -06:00