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

(-)a/Koha/ILL/Backend/Standard.pm (+2 lines)
Lines 1015-1020 sub add_request { Link Here
1015
    $request->extended_attributes( \@request_details_array );
1015
    $request->extended_attributes( \@request_details_array );
1016
    $request->add_unauthenticated_data( $params->{other} ) if $unauthenticated_request;
1016
    $request->add_unauthenticated_data( $params->{other} ) if $unauthenticated_request;
1017
1017
1018
    $request->after_created;
1019
1018
    return $request;
1020
    return $request;
1019
}
1021
}
1020
1022
(-)a/Koha/ILL/Request.pm (-1 / +53 lines)
Lines 913-918 sub mark_completed { Link Here
913
    my ($self) = @_;
913
    my ($self) = @_;
914
    $self->status('COMP')->store;
914
    $self->status('COMP')->store;
915
    $self->completed( dt_from_string() )->store;
915
    $self->completed( dt_from_string() )->store;
916
    $self->after_completed();
916
    return {
917
    return {
917
        error   => 0,
918
        error   => 0,
918
        status  => '',
919
        status  => '',
Lines 2115-2120 sub store { Link Here
2115
    return $ret;
2116
    return $ret;
2116
}
2117
}
2117
2118
2119
=head3 after_completed
2120
2121
    $request->after_completed;
2122
2123
Actions to be done after the request has been completed
2124
2125
=cut
2126
2127
sub after_completed {
2128
    my ($self) = @_;
2129
2130
    C4::Stats::UpdateStats(
2131
        {
2132
            borrowernumber => $self->borrowernumber // undef,
2133
            branch         => $self->branchcode,
2134
            categorycode   => $self->patron ? $self->patron->categorycode : undef,
2135
            ccode          => undef,
2136
            illrequest_id  => $self->illrequest_id,
2137
            itemnumber     => undef,
2138
            itemtype       => undef,
2139
            location       => undef,
2140
            type           => 'illreq_comp',
2141
        }
2142
    );
2143
}
2144
2145
=head3 after_created
2146
2147
    $request->after_created;
2148
2149
Actions to be done after the request has been fully created
2150
2151
=cut
2152
2153
sub after_created {
2154
    my ($self) = @_;
2155
2156
    C4::Stats::UpdateStats(
2157
        {
2158
            borrowernumber => $self->borrowernumber // undef,
2159
            branch         => $self->branchcode,
2160
            categorycode   => $self->patron ? $self->patron->categorycode : undef,
2161
            ccode          => undef,
2162
            illrequest_id  => $self->illrequest_id,
2163
            itemnumber     => undef,
2164
            itemtype       => undef,
2165
            location       => undef,
2166
            type           => 'illreq_created',
2167
        }
2168
    );
2169
}
2170
2118
=head3 requested_partners
2171
=head3 requested_partners
2119
2172
2120
    my $partners_string = $request->requested_partners;
2173
    my $partners_string = $request->requested_partners;
2121
- 

Return to bug 37901