https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36873 Bug ID: 36873 Summary: Koha::Objects->delete should accept parameters and pass them through Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com QA Contact: testopia@bugs.koha-community.org Taking `Koha::Item->delete` as an example, it accepts many parameters. Calling `Koha::Items->delete` will find out there's a `delete()` method defined in `Koha::Item` and loop through all items, calling that particular method. It would be handy if we could pass on some parameters. As an example, the following sequence: ```perl $biblio->items->delete; DelBiblio( $biblio->id); ``` would trigger reindexing the record for each item, and then when actually deleting the biblio. With the current codebase, to avoid it, we could instead do: ```perl foreach my $item ($biblio->items->as_list) { $item->delete( { skip_record_index } ); } DelBiblio( $biblio->id); ``` But it would be great if we could just write: ```perl $biblio->items->delete( { skip_record_index => 1 } ); DelBiblio( $biblio->id ); ``` -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.