View | Details | Raw Unified | Return to bug 30648
Collapse All | Expand All

(-)a/C4/Biblio.pm (+3 lines)
Lines 554-559 sub DelBiblio { Link Here
554
554
555
    # We delete any existing holds
555
    # We delete any existing holds
556
    my $holds = $biblio->holds;
556
    my $holds = $biblio->holds;
557
    $holds->update({ deleted_biblionumber =>  $biblionumber }, { no_triggers => 1 });
558
    my $old_holds = $biblio->old_holds;
559
    $old_holds->update({ deleted_biblionumber =>  $biblionumber }, { no_triggers => 1 });
557
    while ( my $hold = $holds->next ) {
560
    while ( my $hold = $holds->next ) {
558
        # no need to update the holds queue on each step, we'll do it at the end
561
        # no need to update the holds queue on each step, we'll do it at the end
559
        $hold->cancel({ skip_holds_queue => 1 });
562
        $hold->cancel({ skip_holds_queue => 1 });
(-)a/Koha/Biblio.pm (-1 / +16 lines)
Lines 52-57 use Koha::Item::Transfer::Limits; Link Here
52
use Koha::Items;
52
use Koha::Items;
53
use Koha::Libraries;
53
use Koha::Libraries;
54
use Koha::Old::Checkouts;
54
use Koha::Old::Checkouts;
55
use Koha::Old::Holds;
55
use Koha::Ratings;
56
use Koha::Ratings;
56
use Koha::Recalls;
57
use Koha::Recalls;
57
use Koha::RecordProcessor;
58
use Koha::RecordProcessor;
Lines 715-720 sub holds { Link Here
715
    return Koha::Holds->_new_from_dbic($hold_rs);
716
    return Koha::Holds->_new_from_dbic($hold_rs);
716
}
717
}
717
718
719
=head3 old_holds
720
721
my $old_holds = $biblio->old_holds();
722
723
return the historic holds placed on this record
724
725
=cut
726
727
sub old_holds {
728
    my ( $self, $params, $attributes ) = @_;
729
    $attributes->{order_by} = 'priority' unless exists $attributes->{order_by};
730
    my $old_hold_rs = $self->_result->old_reserves->search( $params, $attributes );
731
    return Koha::Old::Holds->_new_from_dbic($old_hold_rs);
732
}
733
718
=head3 current_holds
734
=head3 current_holds
719
735
720
my $holds = $biblio->current_holds
736
my $holds = $biblio->current_holds
721
- 

Return to bug 30648