Lines 108-114
sub process {
Link Here
|
108 |
|
108 |
|
109 |
my $item = Koha::Items->find($record_id) || next; |
109 |
my $item = Koha::Items->find($record_id) || next; |
110 |
|
110 |
|
111 |
my $return = $item->safe_delete({ skip_record_index => 1 }); |
111 |
my $return = $item->safe_delete({ skip_record_index => 1, skip_holds_queue => 1 }); |
112 |
unless ( $return ) { |
112 |
unless ( $return ) { |
113 |
|
113 |
|
114 |
# FIXME Do we need to rollback the whole transaction if a deletion failed? |
114 |
# FIXME Do we need to rollback the whole transaction if a deletion failed? |
Lines 141-147
sub process {
Link Here
|
141 |
Koha::Biblios->find($biblionumber)->items->count; |
141 |
Koha::Biblios->find($biblionumber)->items->count; |
142 |
if ( $delete_biblios && $items_count == 0 ) { |
142 |
if ( $delete_biblios && $items_count == 0 ) { |
143 |
my $error = C4::Biblio::DelBiblio( $biblionumber, |
143 |
my $error = C4::Biblio::DelBiblio( $biblionumber, |
144 |
{ skip_record_index => 1 } ); |
144 |
{ skip_record_index => 1, skip_holds_queue => 1 } ); |
145 |
unless ($error) { |
145 |
unless ($error) { |
146 |
push @deleted_biblionumbers, $biblionumber; |
146 |
push @deleted_biblionumbers, $biblionumber; |
147 |
} |
147 |
} |
Lines 156-161
sub process {
Link Here
|
156 |
|
156 |
|
157 |
$indexer->index_records( \@deleted_biblionumbers, |
157 |
$indexer->index_records( \@deleted_biblionumbers, |
158 |
'recordDelete', "biblioserver", undef ); |
158 |
'recordDelete', "biblioserver", undef ); |
|
|
159 |
|
160 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
161 |
{ |
162 |
biblio_ids => \@deleted_biblionumbers |
163 |
} |
164 |
); |
159 |
} |
165 |
} |
160 |
|
166 |
|
161 |
if (@updated_biblionumbers) { |
167 |
if (@updated_biblionumbers) { |
Lines 164-169
sub process {
Link Here
|
164 |
|
170 |
|
165 |
$indexer->index_records( \@updated_biblionumbers, |
171 |
$indexer->index_records( \@updated_biblionumbers, |
166 |
'specialUpdate', "biblioserver", undef ); |
172 |
'specialUpdate', "biblioserver", undef ); |
|
|
173 |
|
174 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
175 |
{ |
176 |
biblio_ids => \@updated_biblionumbers |
177 |
} |
178 |
); |
167 |
} |
179 |
} |
168 |
} |
180 |
} |
169 |
); |
181 |
); |