https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23909 --- Comment #27 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197921 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197921&action=edit Bug 23909: Preserve SCO behavior on upgrade (value 1 -> 2) The atomicupdate converts AllowItemsOnHoldCheckoutSCO and AllowItemsOnHoldCheckoutSIP from YesNo to Choice (0|1|2), where value 1 now means "Allow pending holds only" and value 2 means "Allow pending and waiting holds". For AllowItemsOnHoldCheckoutSCO, pre-upgrade value 1 meant "allow all on-hold checkouts (pending AND waiting)" at SCO. Post-upgrade, sco-main.pl reads value 1 as "pending only", silently downgrading sites that previously allowed waiting-hold checkouts. Remap SCO value 1 -> 2 at upgrade time to preserve prior behavior. For AllowItemsOnHoldCheckoutSIP, the SIP checkout code was already gated on >= 1 for pending and >= 2 for waiting, so value 1 meant "pending only" in practice even under the old YesNo type. No value migration is needed -- leaving it at 1 preserves current behavior. The value remap lives inside the branch that only runs when the type is not already Choice, so re-running the atomicupdate is safe and will not double-remap. Test plan: 1) On a pre-upgrade DB, set both prefs to YesNo/1: UPDATE systempreferences SET type='YesNo', options=NULL, value='1' WHERE variable IN ('AllowItemsOnHoldCheckoutSCO', 'AllowItemsOnHoldCheckoutSIP'); 2) Run installer/data/mysql/updatedatabase.pl. 3) Verify: SELECT variable, type, options, value FROM systempreferences WHERE variable IN ('AllowItemsOnHoldCheckoutSCO', 'AllowItemsOnHoldCheckoutSIP'); SCO -> type=Choice, options=0|1|2, value=2. SIP -> type=Choice, options=0|1|2, value=1. 4) Re-run updatedatabase.pl; confirm both prefs report "already migrated, skipping" and values are unchanged. 5) Spot-check other starting values: SCO=0 stays 0, SCO=2 stays 2, SIP=0 stays 0. -- You are receiving this mail because: You are watching all bug changes.