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

(-)a/C4/Reserves.pm (-1 / +9 lines)
Lines 1125-1131 sub ModReserveFill { Link Here
1125
        if C4::Context->preference('HoldsLog');
1125
        if C4::Context->preference('HoldsLog');
1126
1126
1127
    # FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log
1127
    # FIXME Must call Koha::Hold->cancel ? => No, should call ->filled and add the correct log
1128
    Koha::Old::Hold->new( $hold->unblessed() )->store();
1128
    my $old_hold = Koha::Old::Hold->new( $hold->unblessed() )->store();
1129
1130
    Koha::Plugins->call(
1131
        'after_hold_action',
1132
        {
1133
            action  => 'fill',
1134
            payload => { hold => $old_hold->get_from_storage }
1135
        }
1136
    );
1129
1137
1130
    $hold->delete();
1138
    $hold->delete();
1131
1139
(-)a/Koha/Hold.pm (-2 / +27 lines)
Lines 34-39 use Koha::Items; Link Here
34
use Koha::Libraries;
34
use Koha::Libraries;
35
use Koha::Old::Holds;
35
use Koha::Old::Holds;
36
use Koha::Calendar;
36
use Koha::Calendar;
37
use Koha::Plugins;
37
38
38
use Koha::Exceptions::Hold;
39
use Koha::Exceptions::Hold;
39
40
Lines 112-117 sub suspend_hold { Link Here
112
    $self->suspend_until($date);
113
    $self->suspend_until($date);
113
    $self->store();
114
    $self->store();
114
115
116
    Koha::Plugins->call(
117
        'after_hold_action',
118
        {
119
            action  => 'suspend',
120
            payload => { hold => $self->get_from_storage }
121
        }
122
    );
123
115
    logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self )
124
    logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self )
116
        if C4::Context->preference('HoldsLog');
125
        if C4::Context->preference('HoldsLog');
117
126
Lines 132-137 sub resume { Link Here
132
141
133
    $self->store();
142
    $self->store();
134
143
144
    Koha::Plugins->call(
145
        'after_hold_action',
146
        {
147
            action  => 'resume',
148
            payload => { hold => $self->get_from_storage }
149
        }
150
    );
151
135
    logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self )
152
    logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self )
136
        if C4::Context->preference('HoldsLog');
153
        if C4::Context->preference('HoldsLog');
137
154
Lines 545-551 sub cancel { Link Here
545
                }
562
                }
546
            }
563
            }
547
564
548
            $self->_move_to_old;
565
            my $old_me = $self->_move_to_old;
566
567
            Koha::Plugins->call(
568
                'after_hold_action',
569
                {
570
                    action  => 'cancel',
571
                    payload => { hold => $old_me->get_from_storage }
572
                }
573
            );
574
549
            $self->SUPER::delete(); # Do not add a DELETE log
575
            $self->SUPER::delete(); # Do not add a DELETE log
550
576
551
            # now fix the priority on the others....
577
            # now fix the priority on the others....
552
- 

Return to bug 30072