Bugzilla – Attachment 194032 Details for
Bug 40504
ILL requests should have ability to assign staff to manage
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40504: Auto functionality:
b9d17ca.patch (text/plain), 2.64 KB, created by
Lisette Scheer
on 2026-02-26 18:07:13 UTC
(
hide
)
Description:
Bug 40504: Auto functionality:
Filename:
MIME Type:
Creator:
Lisette Scheer
Created:
2026-02-26 18:07:13 UTC
Size:
2.64 KB
patch
obsolete
>From b9d17ca185929ff231c76a2b0f4866652aca2142 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Wed, 15 Oct 2025 11:00:30 +0000 >Subject: [PATCH] Bug 40504: Auto functionality: > >- The staff member who creates a new ILL request is automatically assigned as its manager. >- No manager is assigned to ILL requests made by users without 'ill' permission e.g. patrons using the OPAC. >- When an ILL request without a manager has its status changed, the staff member making the change is automatically assigned as its manager e.g. by clicking 'confirm' or 'revert request'. >- It is possible to manually update a request's manager by clicking the 'Edit request' toolbar button when viewing a request. The patron search modal, 'select manager' button and all its functionality is shared with the 'select manager' present in the suggestions module. This means that when editing an ILL request, the 'managedby' defaults to the staff member editing the request, unless 'Keep existing manager' is clicked, like it happens in suggestions. >- This is fully core built, all backends will automatically hook into this functionality, because: >-- Automatic 'managedby' happen on status change, regardless of backend >-- All requests have access to 'edit request' page, regardless of backend >- Only if a logged in staff member exists does the auto set manager. If no staff member is found, nothing happens e.g. an ILL request status >was changed by a CLI command / cronjob > >Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk> >Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> >--- > Koha/ILL/Request/Logger.pm | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > >diff --git a/Koha/ILL/Request/Logger.pm b/Koha/ILL/Request/Logger.pm >index 2f0cb7f02e0..cac5e401295 100644 >--- a/Koha/ILL/Request/Logger.pm >+++ b/Koha/ILL/Request/Logger.pm >@@ -163,9 +163,28 @@ sub log_status_change { > ) > } > ); >+ $self->auto_set_manager( $params->{request} ); > } > } > >+=head3 auto_set_manager >+ >+ $self->auto_set_manager($params->{request}) >+ >+Automatically set managedby to the staff member updating this request's status if request does not yet have a manager >+ >+=cut >+ >+sub auto_set_manager { >+ my ( $self, $illrequest ) = @_; >+ >+ my $userenv = C4::Context->userenv(); >+ my $usernumber = ( ref($userenv) eq 'HASH' ) ? $userenv->{'number'} : 0; >+ my $patron = Koha::Patrons->find($usernumber); >+ $illrequest->managedby($usernumber)->store() >+ if $patron && $patron->has_permission('ill') && $illrequest && !$illrequest->managedby; >+} >+ > =head3 log_something > > Koha::ILL::Request::Logger->log_something({ >-- >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 40504
:
187906
|
187907
|
187908
|
187909
|
187910
|
187911
|
187912
|
187913
|
187914
|
187915
|
188365
|
188563
|
188565
|
188566
|
188567
|
188568
|
188569
|
188570
|
188571
|
188572
|
188573
|
188574
|
188624
|
188625
|
188935
|
188936
|
191196
|
191197
|
191198
|
191199
|
191200
|
191201
|
191202
|
191203
|
191204
|
191205
|
191206
|
192094
|
193186
|
193187
|
193188
|
193189
|
193190
|
193191
|
193192
|
193193
|
193194
|
193195
|
193196
|
193197
|
194023
|
194024
|
194026
|
194027
|
194028
|
194029
|
194030
|
194031
| 194032 |
194033
|
194034
|
194035
|
194036
|
194037
|
194038