[Koha-bugs] [Bug 32656] Script delete_records_via_leader.pl no longer deletes items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 18 23:01:57 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32656

--- Comment #5 from David Nind <david at davidnind.com> ---
(In reply to Kyle M Hall from comment #4)

> Can you give this one a try? Thanks!

Thanks Kyle! Everything now works as expected. Sign off on the way!

Output after the patch is applied with --test:

  misc/cronjobs/delete_records_via_leader.pl -i -t -v
  RECORD: 146
  TEST MODE: Item 312 would have been deleted
  TEST MODE: Item 313 would have been deleted
  TEST MODE: Item 314 would have been deleted
  TEST MODE: Item 315 would have been deleted
  ERROR DELETING BIBLIO 146: Test mode enabled

  DELETED 0 OF 1 RECORDS
  DELETED 0 OF 4 ITEMS

Output after the patch is applied with --confirm:

  misc/cronjobs/delete_records_via_leader.pl -c -i -v
  RECORD: 146
  DELETED ITEM 312
  DELETED ITEM 313
  DELETED ITEM 314
  DELETED ITEM 315
  DELETED BIBLIO 146

  DELETED 1 OF 1 RECORDS
  DELETED 4 OF 4 ITEMS

I also tested records with and without items using -i and not using -i:
- A record with items: if -i is NOT used, then the record and items are not
deleted (the message is "This Biblio has items attached, please delete them
first before deleting this biblio")
- A record without items: command with or without -i works as expected (record
deleted, there are no items to delete)

David

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list