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 708-713 sub holds { Link Here
708
    return Koha::Holds->_new_from_dbic($hold_rs);
709
    return Koha::Holds->_new_from_dbic($hold_rs);
709
}
710
}
710
711
712
=head3 old_holds
713
714
my $old_holds = $biblio->old_holds();
715
716
return the historic holds placed on this record
717
718
=cut
719
720
sub old_holds {
721
    my ( $self, $params, $attributes ) = @_;
722
    $attributes->{order_by} = 'priority' unless exists $attributes->{order_by};
723
    my $old_hold_rs = $self->_result->old_reserves->search( $params, $attributes );
724
    return Koha::Old::Holds->_new_from_dbic($old_hold_rs);
725
}
726
711
=head3 current_holds
727
=head3 current_holds
712
728
713
my $holds = $biblio->current_holds
729
my $holds = $biblio->current_holds
714
- 

Return to bug 30648