[Bug 37790] New: Prevent indexing and holds queue updates when running update_localuse_from_statistics.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Bug ID: 37790 Summary: Prevent indexing and holds queue updates when running update_localuse_from_statistics.pl Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz The maintenance script touches all items to update the localuse from the statistics table. This will not affect holdability of items, nor it is mapped in the search engine by default. To avoid spawning large numbers of background jobs we should skip these options when storing. -- 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=37790 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=37790 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 170902 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170902&action=edit Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script This patch skips record indexing and real time holds queue updates when updating the localuse field from statistics. A note is added to the script that the user should reindex if the localuse field is mapped. Additionally a verbose option is added to the script, and doubled use of GetOptions is removed. Lastly, a check is added to confirm the items value is being changed before the value is stored. To test: 1 - Enable the real time holds queue 2 - Enable Elasticsearch 3 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 4 - Note all items are touched and reported 5 - Check the background jobs table - there are many jobs generated 6 - Apply patch 7 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 8 - Note 0 items are reported updated, no new background jobs 9 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 10 - No items reported 11 - Update some items in the DB UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 12 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 13 - Only the number of items changed above reported 14 - UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 15 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 16 - Each item changed reported, and the amounts, and the total items updated. -- 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=37790 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Depends on| |16122, 36709 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16122 [Bug 16122] Item record needs to keep local use count https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36709 [Bug 36709] Add --confirm flag to update_localuse_from_statistics.pl script -- 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=37790 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170902|0 |1 is obsolete| | --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 170910 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170910&action=edit Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script This patch skips record indexing and real time holds queue updates when updating the localuse field from statistics. A note is added to the script that the user should reindex if the localuse field is mapped. Additionally a verbose option is added to the script, and doubled use of GetOptions is removed. Lastly, a check is added to confirm the items value is being changed before the value is stored. To test: 1 - Enable the real time holds queue 2 - Enable Elasticsearch 3 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 4 - Note all items are touched and reported 5 - Check the background jobs table - there are many jobs generated 6 - Apply patch 7 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 8 - Note 0 items are reported updated, no new background jobs 9 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 10 - No items reported 11 - Update some items in the DB UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 12 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 13 - Only the number of items changed above reported 14 - UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 15 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 16 - Each item changed reported, and the amounts, and the total items updated. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #170910|0 |1 is obsolete| | --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> --- Created attachment 174446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174446&action=edit Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script This patch skips record indexing and real time holds queue updates when updating the localuse field from statistics. A note is added to the script that the user should reindex if the localuse field is mapped. Additionally a verbose option is added to the script, and doubled use of GetOptions is removed. Lastly, a check is added to confirm the items value is being changed before the value is stored. To test: 1 - Enable the real time holds queue 2 - Enable Elasticsearch 3 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 4 - Note all items are touched and reported 5 - Check the background jobs table - there are many jobs generated 6 - Apply patch 7 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 8 - Note 0 items are reported updated, no new background jobs 9 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 10 - No items reported 11 - Update some items in the DB UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 12 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm 13 - Only the number of items changed above reported 14 - UPDATE items SET localuse = 99 WHERE itemnumber LIKE '%9'; 15 - perl misc/maintenance/update_localuse_from_statistics.pl --confirm --verbose 16 - Each item changed reported, and the amounts, and the total items updated. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Martin Renvoize (ashimema) <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Always like some updated documentation :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|24.11.00 |24.11.00,24.05.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37790 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 36709 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org