Bug 30668

Summary: UpdateItemLocationOnCheckin spams the cataloguing log
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Architecture, internals, and plumbingAssignee: Nick Clemens (kidclamp) <nick>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: victor
Version: MainKeywords: release-notes-needed
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
The UpdateNOtForLoanStatusOnCheckin can be user for the cart feature, or other changes no every checkin. Before this patch these updates were recorded in the cataloguing log, which is intended to capture changes made by catalogers. This patchset avoids logs for these updates, relying on the returns log/statistics to capture the action and change of location. Before these patches the action logs grew very quickly as every checkin could initiate a full log of the item data.
Version(s) released in:
22.05.00
Attachments: Bug 30668: Unit tests
Bug 30668: Do not record itme location updates in cataloguing log
Bug 30668: Unit tests
Bug 30668: Do not record itme location updates in cataloguing log
Bug 30668: Unit tests
Bug 30668: Do not record itme location updates in cataloguing log

Description Nick Clemens (kidclamp) 2022-05-03 13:23:57 UTC
Cart location updates were moved to this system preference, but for libraries utilizing it this way, the cataloguing log records a change per checkin.

We should prevent these changes from being logged
Comment 1 Nick Clemens (kidclamp) 2022-05-06 20:13:11 UTC
Created attachment 134760 [details] [review]
Bug 30668: Unit tests

Simple test to cover UpdateNOtForLoanStatusOnCheckin and UpdateItemLocationOnCheckin
to confirm the cataloguing log does not record these
Comment 2 Nick Clemens (kidclamp) 2022-05-06 20:13:16 UTC
Created attachment 134761 [details] [review]
Bug 30668: Do not record itme location updates in cataloguing log

To test:
1 - Set a rule in UpdateItemLocationOnCheckin
2 - Enable cataloguing log
3 - Check in an item that will trigger a change
4 - Check the modification log for item - there is a cataloguing entry
5 - Apply patch
6 - Repeat
7 - No log!
Comment 3 David Nind 2022-05-06 20:44:39 UTC
Created attachment 134765 [details] [review]
Bug 30668: Unit tests

Simple test to cover UpdateNOtForLoanStatusOnCheckin and UpdateItemLocationOnCheckin
to confirm the cataloguing log does not record these

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2022-05-06 20:44:44 UTC
Created attachment 134766 [details] [review]
Bug 30668: Do not record itme location updates in cataloguing log

To test:
1 - Set a rule in UpdateItemLocationOnCheckin
2 - Enable cataloguing log
3 - Check in an item that will trigger a change
4 - Check the modification log for item - there is a cataloguing entry
5 - Apply patch
6 - Repeat
7 - No log!

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Victor Grousset/tuxayo 2022-05-09 17:30:01 UTC
Created attachment 134788 [details] [review]
Bug 30668: Unit tests

Simple test to cover UpdateNOtForLoanStatusOnCheckin and UpdateItemLocationOnCheckin
to confirm the cataloguing log does not record these

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 6 Victor Grousset/tuxayo 2022-05-09 17:30:05 UTC
Created attachment 134789 [details] [review]
Bug 30668: Do not record itme location updates in cataloguing log

To test:
1 - Set a rule in UpdateItemLocationOnCheckin
2 - Enable cataloguing log
3 - Check in an item that will trigger a change
4 - Check the modification log for item - there is a cataloguing entry
5 - Apply patch
6 - Repeat
7 - No log!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 7 Victor Grousset/tuxayo 2022-05-09 17:30:23 UTC
Works, qa script happy, code looks good, passing QA :)
Comment 8 Fridolin Somers 2022-05-09 20:03:11 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄