This cron gives the following error when run with the -i option but not without. /usr/share/koha/bin/cronjobs/delete_records_via_leader.pl -c -i -v > /var/lib/koha/redacted/d_leader_deleted_bib.log The method Koha::Items->itemnumber is not covered by tests! Trace begun at /usr/share/koha/lib/Koha/Objects.pm line 389 Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x7c1ce60)') called at /usr/share/koha/bin/cronjobs/delete_records_via_leader.pl line 100
Created attachment 96807 [details] [review] Bug 24324: Resolve error with delete_records_via_leader.pl To test: Have a record with the 000 position 5 set to "deleted" (record status) Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v * items and the record should be deleted Mark another record with the 000 position 5 set to deleted (record status) Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v * if the record had items, it will not be deleted * if the record did not have items, it will be deleted.
Created attachment 96808 [details] [review] Bug 24324: Resolve error with delete_records_via_leader.pl To test: Have a record with the 000 position 5 set to "deleted" (record status) Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v * items and the record should be deleted Mark another record with the 000 position 5 set to deleted (record status) Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v * if the record had items, it will not be deleted * if the record did not have items, it will be deleted.
Created attachment 101337 [details] [review] Bug 24324: Resolve error with delete_records_via_leader.pl To test: Have a record with the 000 position 5 set to "deleted" (record status) Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v * items and the record should be deleted Mark another record with the 000 position 5 set to deleted (record status) Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v * if the record had items, it will not be deleted * if the record did not have items, it will be deleted. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works ok. Fixed tab char in line 98, no more errors.
Created attachment 101370 [details] [review] Bug 24324: Resolve error with delete_records_via_leader.pl To test: Have a record with the 000 position 5 set to "deleted" (record status) Use koha-shell to run the job with the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -i -v * items and the record should be deleted Mark another record with the 000 position 5 set to deleted (record status) Use koha-shell to run the job without the -i flag: perl misc/cronjobs/delete_records_via_leader.pl -c -v * if the record had items, it will not be deleted * if the record did not have items, it will be deleted. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Works ok. Fixed tab char in line 98, no more errors. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
backported to 19.11.x for 19.11.05
backported to 19.05.x for 19.05.10
Backported to 18.11.x for 18.11.16