+=head3 filter_out_lost
+
+ my $filered_items = $items->filter_out_lost;
+
+Returns a new resultset, containing those items that are not marked as lost.
+
+=cut
+
+sub filter_out_lost {
+ my ($self) = @_;
+
+ my $params = { itemlost => 0 };
+
+ return $self->search( $params );
+}
+
+=head3 move_to_biblio
+
+ $items->move_to_biblio($to_biblio);
+
+Move items to a given biblio.
+
+=cut
+
+sub move_to_biblio {
+ my ( $self, $to_biblio ) = @_;
+
+ while (my $item = $self->next()) {
+ $item->move_to_biblio($to_biblio, { skip_record_index => 1 });
+ }
+ my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX });
+ $indexer->index_records( $self->biblionumber, "specialUpdate", "biblioserver" );
+ $indexer->index_records( $from_biblio->biblionumber, "specialUpdate", "biblioserver" );
+}
+
+