[Bug 41660] New: Action logs are not created for automatic item updates triggered by UpdateNotForLoanStatusOnCheckin / UpdateNotForLoanStatusOnCheckout
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Bug ID: 41660 Summary: Action logs are not created for automatic item updates triggered by UpdateNotForLoanStatusOnCheckin / UpdateNotForLoanStatusOnCheckout Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: elina.uotila@jarvenpaa.fi QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When an item’s not for loan status is automatically updated by the system preference UpdateNotForLoanStatusOnCheckin or by the system preference UpdateNotForLoanStatusOnCheckout, no entry is written to the action_logs table. In contrast, manually updating an item’s not for loan status does create an entry in action_logs when CataloguingLog is set to Log. Automatic updates triggered by these system preferences should also be recorded in action_logs for consistency and auditability. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |22794 CC| |martin.renvoize@openfifth.c | |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22794 [Bug 22794] Improve and extend staff accessible logging in Koha -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Michael Adamyk <michael.adamyk@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.adamyk@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Melissa <mwalker@akronlibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mwalker@akronlibrary.org --- Comment #1 from Melissa <mwalker@akronlibrary.org> --- +1 This would be very helpful. We are having an issue where an item leaves TS, it's in processing status--and it's made "available" when it's checked in. This isn't being logged. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Depends on| |30668, 18816 --- Comment #2 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I've done some digging through github and BZ for history. It looks like logging of changes to NotForLoan status at checkin and checkout was removed as part of Bug 18816 - "Make CataloguingLog work in production by preventing circulation from spamming the log." The release notes there read "This enhancement stops unnecessary logging of every check in and check out actions when the CataloguingLog system preference is enabled." Prior to Bug 18816, the cataloging log would record the change to items.onloan resulting from every checkin and checkout, which seems to be what the release notes are primarily referring to. Updates to an item's NotForLoan status at checkin or checkout can be assumed to be reasonably less frequent. Later, a unit test was added to ensure that changes to NotForLoan status at checkin or checkout would not be logged. These were added in Bug 30668 - "UpdateItemLocationOnCheckin spams the cataloguing log." The need to prevent logging of changes to item location at checkin stems from use of the CART location and cart-to-shelf functionality -- for libraries using CART, every item checked in gets its location changed. As above, updates to an item's NotForLoan status at checkin or checkout can be assumed to be reasonably less frequent than changes to location when using CART. Bug 30688 did not change any functionality around the logging of NotForLoan changes, but added tests for the prevention of logging for both location changes and not for loan changes. Ultimately, I'd argue that changes to items' NotForLoan statuses at checkout/checkin happen on a relatively small number of checkouts or checkins and are worth logging. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18816 [Bug 18816] Make CataloguingLog work in production by preventing circulation from spamming the log https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30668 [Bug 30668] UpdateItemLocationOnCheckin spams the cataloguing log -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |andrew@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- 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 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- I got this patch together and then went to a meeting before I posted it here. While I was in that meeting, all of the VUE-based checkin stuff pushed to 26.11, so this super doesn't apply anymore. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #211883|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 --- Comment #5 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 211884 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211884&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 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41660 --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Andrew Fuerste-Henry from comment #5)
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.
I didn't read Claude's little preamble closely enough. This part is inaccurate; bug 30668 did not disable NotForLoan update logging. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org