Summary: | Prevent indexing and holds queue updates when running update_localuse_from_statistics.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Nick Clemens (kidclamp) <nick> |
Component: | Command-line Utilities | Assignee: | Nick Clemens (kidclamp) <nick> |
Status: | Needs documenting --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, martin.renvoize, robin |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.06
|
|
Circulation function: | |||
Bug Depends on: | 16122, 36709 | ||
Bug Blocks: | |||
Attachments: |
Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script
Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script |
Description
Nick Clemens (kidclamp)
2024-08-30 11:05:31 UTC
Created attachment 170902 [details] [review] 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. Created attachment 170910 [details] [review] 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> Created attachment 174446 [details] [review] 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> Always like some updated documentation :) Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.06 |