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

(-)a/C4/Reserves.pm (-6 / +6 lines)
Lines 1007-1012 that the item is not waiting on the hold shelf, setting the Link Here
1007
priority to a non-zero value also sets the request's found
1007
priority to a non-zero value also sets the request's found
1008
status and waiting date to NULL.
1008
status and waiting date to NULL.
1009
1009
1010
If the hold is 'found' (waiting, in-transit, processing) the
1011
only field that can be updated is the expiration date.
1012
1010
The optional C<$itemnumber> parameter is used only when
1013
The optional C<$itemnumber> parameter is used only when
1011
C<$rank> is a non-zero integer; if supplied, the itemnumber
1014
C<$rank> is a non-zero integer; if supplied, the itemnumber
1012
of the hold request is set accordingly; if omitted, the itemnumber
1015
of the hold request is set accordingly; if omitted, the itemnumber
Lines 1030-1035 sub ModReserve { Link Here
1030
    my $borrowernumber = $params->{'borrowernumber'};
1033
    my $borrowernumber = $params->{'borrowernumber'};
1031
    my $biblionumber = $params->{'biblionumber'};
1034
    my $biblionumber = $params->{'biblionumber'};
1032
    my $cancellation_reason = $params->{'cancellation_reason'};
1035
    my $cancellation_reason = $params->{'cancellation_reason'};
1036
    my $date = $params->{expirationdate};
1033
1037
1034
    return if $rank eq "n";
1038
    return if $rank eq "n";
1035
1039
Lines 1048-1062 sub ModReserve { Link Here
1048
    if ( $rank eq "del" ) {
1052
    if ( $rank eq "del" ) {
1049
        $hold->cancel({ cancellation_reason => $cancellation_reason });
1053
        $hold->cancel({ cancellation_reason => $cancellation_reason });
1050
    }
1054
    }
1051
    elsif ($hold->found && $hold->priority eq '0') {
1055
    elsif ($hold->found && $hold->priority eq '0' && $date) {
1052
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
1056
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
1053
            if C4::Context->preference('HoldsLog');
1057
            if C4::Context->preference('HoldsLog');
1054
1058
1055
        # The only column that can be updated for a found hold is the expiration date
1059
        # The only column that can be updated for a found hold is the expiration date
1056
        my $date = $params->{expirationdate};
1060
        $hold->expirationdate(dt_from_string($date))->store();
1057
        if ($date) {
1058
            $hold->expirationdate(dt_from_string($date))->store();
1059
        }
1060
    }
1061
    }
1061
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1062
    elsif ($rank =~ /^\d+/ and $rank > 0) {
1062
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
1063
        logaction( 'HOLDS', 'MODIFY', $hold->reserve_id, Dumper($hold->unblessed) )
1063
- 

Return to bug 25619