Lines 92-97
my $hold = $hold->suspend_hold( $suspend_until );
Link Here
|
92 |
sub suspend_hold { |
92 |
sub suspend_hold { |
93 |
my ( $self, $date ) = @_; |
93 |
my ( $self, $date ) = @_; |
94 |
|
94 |
|
|
|
95 |
my $original = C4::Context->preference('HoldsLog') ? $self->unblessed : undef; |
96 |
|
95 |
$date &&= dt_from_string($date)->truncate( to => 'day' )->datetime; |
97 |
$date &&= dt_from_string($date)->truncate( to => 'day' )->datetime; |
96 |
|
98 |
|
97 |
if ( $self->is_found ) { # We can't suspend found holds |
99 |
if ( $self->is_found ) { # We can't suspend found holds |
Lines 126-132
sub suspend_hold {
Link Here
|
126 |
} |
128 |
} |
127 |
); |
129 |
); |
128 |
|
130 |
|
129 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self ) |
131 |
logaction( 'HOLDS', 'SUSPEND', $self->reserve_id, $self, undef, $original ) |
130 |
if C4::Context->preference('HoldsLog'); |
132 |
if C4::Context->preference('HoldsLog'); |
131 |
|
133 |
|
132 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
134 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
Lines 147-152
my $hold = $hold->resume();
Link Here
|
147 |
sub resume { |
149 |
sub resume { |
148 |
my ( $self ) = @_; |
150 |
my ( $self ) = @_; |
149 |
|
151 |
|
|
|
152 |
my $original = C4::Context->preference('HoldsLog') ? $self->unblessed : undef; |
153 |
|
150 |
$self->suspend(0); |
154 |
$self->suspend(0); |
151 |
$self->suspend_until( undef ); |
155 |
$self->suspend_until( undef ); |
152 |
|
156 |
|
Lines 160-166
sub resume {
Link Here
|
160 |
} |
164 |
} |
161 |
); |
165 |
); |
162 |
|
166 |
|
163 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self ) |
167 |
logaction( 'HOLDS', 'RESUME', $self->reserve_id, $self, undef, $original ) |
164 |
if C4::Context->preference('HoldsLog'); |
168 |
if C4::Context->preference('HoldsLog'); |
165 |
|
169 |
|
166 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
170 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
Lines 669-674
sub cancel {
Link Here
|
669 |
|
673 |
|
670 |
my $autofill_next = $params->{autofill} && $self->itemnumber && $self->found && $self->found eq 'W'; |
674 |
my $autofill_next = $params->{autofill} && $self->itemnumber && $self->found && $self->found eq 'W'; |
671 |
|
675 |
|
|
|
676 |
my $original = C4::Context->preference('HoldsLog') ? $self->unblessed : undef; |
677 |
|
672 |
$self->_result->result_source->schema->txn_do( |
678 |
$self->_result->result_source->schema->txn_do( |
673 |
sub { |
679 |
sub { |
674 |
my $patron = $self->patron; |
680 |
my $patron = $self->patron; |
Lines 741-747
sub cancel {
Link Here
|
741 |
); |
747 |
); |
742 |
} |
748 |
} |
743 |
|
749 |
|
744 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, $self ) |
750 |
C4::Log::logaction( 'HOLDS', 'CANCEL', $self->reserve_id, $self, undef, $original ) |
745 |
if C4::Context->preference('HoldsLog'); |
751 |
if C4::Context->preference('HoldsLog'); |
746 |
|
752 |
|
747 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
753 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
Lines 781-786
sub fill {
Link Here
|
781 |
sub { |
787 |
sub { |
782 |
my $patron = $self->patron; |
788 |
my $patron = $self->patron; |
783 |
|
789 |
|
|
|
790 |
my $original = C4::Context->preference('HoldsLog') ? $self->unblessed : undef; |
791 |
|
784 |
$self->set( |
792 |
$self->set( |
785 |
{ |
793 |
{ |
786 |
found => 'F', |
794 |
found => 'F', |
Lines 825-831
sub fill {
Link Here
|
825 |
} |
833 |
} |
826 |
} |
834 |
} |
827 |
|
835 |
|
828 |
C4::Log::logaction( 'HOLDS', 'FILL', $self->id, $self ) |
836 |
C4::Log::logaction( 'HOLDS', 'FILL', $self->id, $self, undef, $original ) |
829 |
if C4::Context->preference('HoldsLog'); |
837 |
if C4::Context->preference('HoldsLog'); |
830 |
|
838 |
|
831 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
839 |
Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue->new->enqueue( |
832 |
- |
|
|