https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660
--- Comment #3 from Andrew Fuerste-Henry <[email protected]> --- Created attachment 211883 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211883&action=edit Bug 41660: Log automatic notforloan updates from UpdateNotForLoanStatusOnCheckin/Checkout When an item's notforloan value is changed automatically by the UpdateNotForLoanStatusOnCheckin or UpdateNotForLoanStatusOnCheckout system preferences, no entry is written to action_logs, even with CataloguingLog enabled. This makes it impossible to tell when, for example, an item left a "processing" status and became available. Logging for these updates was turned off by bug 30668 to stop UpdateItemLocationOnCheckin from spamming the cataloguing log when used for shelving carts. Notforloan rules typically fire once per item (e.g. on-order/processing -> available) rather than on every checkin, so this patch re-enables logging for the notforloan updates only. Location updates remain unlogged. The two existing "is not logged" tests that actually exercise UpdateItemLocationOnCheckin/Checkout are relabelled to say so. Test plan: 1. Enable CataloguingLog 2. Set UpdateNotForLoanStatusOnCheckin to: _ALL_: -1: 0 3. Set an item's Not for loan value to -1 (Ordered) 4. Check the item in 5. Confirm the item is now available (notforloan 0) 6. Go to Tools > Log viewer (or the item's Modification log): no Cataloguing entry was recorded for the change 7. Apply patch, restart_all 8. Repeat 3-6: a Cataloguing "Modify" entry is now recorded, showing notforloan changing from -1 to 0 9. Clear UpdateNotForLoanStatusOnCheckin, set UpdateNotForLoanStatusOnCheckout to: -1: 0 10. Set the item's Not for loan value back to -1 and check it out 11. Confirm a Cataloguing "Modify" entry is recorded for the change 12. Confirm location updates are still not logged (bug 30668 behaviour is unchanged): a. Clear UpdateNotForLoanStatusOnCheckin and UpdateNotForLoanStatusOnCheckout, and check the item in b. Set UpdateItemLocationOnCheckin to: FIC: GEN c. Edit the item so its shelving location is FIC d. Note the number of Cataloguing entries for the item in the log viewer e. Check the item in f. Confirm the item's location is now GEN, and no new Cataloguing entry was recorded g. Clear UpdateItemLocationOnCheckin and set UpdateItemLocationOnCheckout to: GEN: FIC h. Check the item out i. Confirm the item's location is now FIC, and no new Cataloguing entry was recorded Note: use a location other than CART for these steps. Checking out an item from CART also returns it to its permanent location through CartToShelf, which writes its own log entry. 13. prove t/db_dependent/Circulation/issue.t Co-Authored-By: Claude Opus 5.5 <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
