Koha-clms/misc/maintenance
Nick Clemens 3f2af68a05 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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 1ba5e028cb)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-12-05 22:41:21 +00:00
..
UNIMARC_fix_collectiontitle.pl
…
UNIMARC_sync_date_created_with_marc_biblio.pl
…
acq_cancel_obsolete_orders.pl Bug 36068: (QA follow-up) Add OPTIONS section in POD 2024-04-19 18:06:31 +02:00
audit_database.pl Bug 34064: Tidy script 2023-10-10 10:54:05 -03:00
auth_show_hidden_data.pl
…
borrowers-force-messaging-defaults.pl Bug 33239: (QA follow-up) Tidy and improve description 2023-10-11 10:31:46 -03:00
check_syspref_cache.pl Bug 32922: Remove space in shebang 2023-02-20 09:44:06 -03:00
check_sysprefs.sh
…
cmp_sysprefs.pl
…
compare_es_to_db.pl Bug 33626: Remove invalid params 2023-05-05 10:18:56 -03:00
dedup_authorities.pl Bug 13706: Minor tidy/spelling issues 2024-04-26 14:14:54 +02:00
fix_accountlines_date.pl
…
fix_accountlines_rmdupfines_bug8253.pl
…
fix_invalid_dates.pl Bug 31143: (follow-up) Add description to fix_invalid_dates.pl 2024-11-15 16:01:44 +00:00
fix_mysql_constraints.pl
…
fix_tags_weight.pl
…
generate_MARC21Languages.pl Bug 33341: Address some perlcritic errors in 5.36 2023-03-28 14:50:33 +02:00
make_zebra_dom_cfg_from_record_abs
…
process_record_through_filter.pl
…
pseudonymize_statistics.pl Bug 34611: Confirm run if pseudonymized transactions found and add verbose feedback 2024-03-19 10:25:06 +01:00
remove_items_from_biblioitems.pl
…
sanitize_records.pl
…
search_for_data_inconsistencies.pl Bug 31143: (QA follow-up) Tidy 2024-11-15 16:00:29 +00:00
sync_db_comments.pl Bug 32334: Fix spelling 2023-04-12 11:22:04 -03:00
touch_all_biblios.pl Bug 37037: (RM follow-up) Add hint at end of script run 2024-07-10 17:00:00 +00:00
touch_all_items.pl
…
update_authorities.pl
…
update_localuse_from_statistics.pl Bug 37790: Add skip indexing and holds queue options and verbosity to update localuse script 2024-12-05 22:41:21 +00:00