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

(-)a/Koha/Hold.pm (+1 lines)
Lines 303-308 sub remove_as_hold_group_target { Link Here
303
    my ($self) = @_;
303
    my ($self) = @_;
304
304
305
    if (   $self->hold_group
305
    if (   $self->hold_group
306
        && $self->hold_group->target_hold_id
306
        && $self->hold_group->target_hold_id eq $self->reserve_id
307
        && $self->hold_group->target_hold_id eq $self->reserve_id
307
        && C4::Context->preference("DisplayAddHoldGroups") )
308
        && C4::Context->preference("DisplayAddHoldGroups") )
308
    {
309
    {
(-)a/t/db_dependent/Koha/Hold.t (-3 / +2 lines)
Lines 36-42 use Koha::DateUtils qw(dt_from_string); Link Here
36
use Koha::Holds;
36
use Koha::Holds;
37
use Koha::Libraries;
37
use Koha::Libraries;
38
use Koha::Old::Holds;
38
use Koha::Old::Holds;
39
use C4::Reserves    qw( AddReserve ModReserveAffect RevertWaitingStatus);
39
use C4::Reserves    qw( AddReserve ModReserveAffect );
40
use C4::Circulation qw( AddReturn );
40
use C4::Circulation qw( AddReturn );
41
41
42
my $schema  = Koha::Database->new->schema;
42
my $schema  = Koha::Database->new->schema;
Lines 2078-2084 subtest '_Findgroupreserve in the context of hold groups' => sub { Link Here
2078
2078
2079
    is( $hold->is_hold_group_target, 1, 'First hold is the hold group target' );
2079
    is( $hold->is_hold_group_target, 1, 'First hold is the hold group target' );
2080
2080
2081
    C4::Reserves::RevertWaitingStatus( { itemnumber => $item->itemnumber } );
2081
    $hold->revert_found( { itemnumber => $item->itemnumber } );
2082
    is( $hold->is_hold_group_target,       0,     'First hold is no longer the hold group target' );
2082
    is( $hold->is_hold_group_target,       0,     'First hold is no longer the hold group target' );
2083
    is( $hold->hold_group->target_hold_id, undef, 'Hold group no longer has a target' );
2083
    is( $hold->hold_group->target_hold_id, undef, 'Hold group no longer has a target' );
2084
2084
2085
- 

Return to bug 40529