Bugzilla – Attachment 181706 Details for
Bug 37901
Add ILL pseudonymization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37901: UpdateStats after new ILL request is created or completed
Bug-37901-UpdateStats-after-new-ILL-request-is-cre.patch (text/plain), 2.73 KB, created by
Pedro Amorim
on 2025-04-30 08:34:17 UTC
(
hide
)
Description:
Bug 37901: UpdateStats after new ILL request is created or completed
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-04-30 08:34:17 UTC
Size:
2.73 KB
patch
obsolete
>From 61f29816452ac67fadb038631be39594d4417b9b Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Mon, 3 Mar 2025 15:32:08 -0100 >Subject: [PATCH] Bug 37901: UpdateStats after new ILL request is created or > completed > >Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> >--- > Koha/ILL/Backend/Standard.pm | 2 ++ > Koha/ILL/Request.pm | 53 ++++++++++++++++++++++++++++++++++++ > 2 files changed, 55 insertions(+) > >diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm >index 9f783893066..e37c69b679e 100644 >--- a/Koha/ILL/Backend/Standard.pm >+++ b/Koha/ILL/Backend/Standard.pm >@@ -1015,6 +1015,8 @@ sub add_request { > $request->extended_attributes( \@request_details_array ); > $request->add_unauthenticated_data( $params->{other} ) if $unauthenticated_request; > >+ $request->after_created; >+ > return $request; > } > >diff --git a/Koha/ILL/Request.pm b/Koha/ILL/Request.pm >index 9b151e3924c..6115e4d74bc 100644 >--- a/Koha/ILL/Request.pm >+++ b/Koha/ILL/Request.pm >@@ -913,6 +913,7 @@ sub mark_completed { > my ($self) = @_; > $self->status('COMP')->store; > $self->completed( dt_from_string() )->store; >+ $self->after_completed(); > return { > error => 0, > status => '', >@@ -2115,6 +2116,58 @@ sub store { > return $ret; > } > >+=head3 after_completed >+ >+ $request->after_completed; >+ >+Actions to be done after the request has been completed >+ >+=cut >+ >+sub after_completed { >+ my ($self) = @_; >+ >+ C4::Stats::UpdateStats( >+ { >+ borrowernumber => $self->borrowernumber // undef, >+ branch => $self->branchcode, >+ categorycode => $self->patron ? $self->patron->categorycode : undef, >+ ccode => undef, >+ illrequest_id => $self->illrequest_id, >+ itemnumber => undef, >+ itemtype => undef, >+ location => undef, >+ type => 'illreq_comp', >+ } >+ ); >+} >+ >+=head3 after_created >+ >+ $request->after_created; >+ >+Actions to be done after the request has been fully created >+ >+=cut >+ >+sub after_created { >+ my ($self) = @_; >+ >+ C4::Stats::UpdateStats( >+ { >+ borrowernumber => $self->borrowernumber // undef, >+ branch => $self->branchcode, >+ categorycode => $self->patron ? $self->patron->categorycode : undef, >+ ccode => undef, >+ illrequest_id => $self->illrequest_id, >+ itemnumber => undef, >+ itemtype => undef, >+ location => undef, >+ type => 'illreq_created', >+ } >+ ); >+} >+ > =head3 requested_partners > > my $partners_string = $request->requested_partners; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37901
:
178356
|
178956
|
178957
|
178958
|
178959
|
178960
|
178961
|
178962
|
178963
|
178964
|
178965
|
178966
|
178967
|
178968
|
178980
|
178981
|
178982
|
178983
|
178984
|
178985
|
178986
|
178987
|
178988
|
178989
|
178990
|
178991
|
178992
|
181008
|
181009
|
181010
|
181011
|
181012
|
181013
|
181014
|
181015
|
181016
|
181017
|
181018
|
181019
|
181020
|
181696
|
181697
|
181698
|
181699
|
181700
|
181701
|
181702
|
181703
|
181704
|
181705
| 181706 |
181707
|
181708