Bug 35143 - Add hooks for status changes to ILL requests to send_staff_notice
Summary: Add hooks for status changes to ILL requests to send_staff_notice
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact:
URL:
Keywords:
: 36551 39129 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-10-24 14:13 UTC by Philip Orr
Modified: 2025-02-25 15:29 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Orr 2023-10-24 14:13:30 UTC
If the library is using ILL, currently Email notifications can only be (automatically) sent to ILL staff when a patron makes a request to modify or cancel an existing request. The notice templates for those two cases are ILL_REQUEST_CANCEL and ILL_REQUEST_MODIFIED. 

It would be great if there was also a possibility to automatically send a mail to staff when a patron first creates a request.

As ashimema said (paraphrasing here): it would be good to generally add hooks and tie them to the status field so that any status change of an ILL request triggers the corresponding ILL_REQUEST_NEWSTATUS notice if it exists (where NEWSTATUS stands for the new status after the status has changed).

Some status changes for instance:

ILL_REQUEST_NEW -> sent when request is first created.
ILL_REQUEST_CANCEL -> same as it is now, sent when patron wishes to cancel a request
ILL_REQUEST_IN_DELIVERY -> sent when status changes to "in delivery".
Comment 1 Marie-Luce Laflamme 2024-03-14 18:10:16 UTC
Yes, it would be great to send an email to the library whenever there's a new ILL request. It could also be useful to add an alert next to the 'new suggestion pending' warning on the staff lending page.
Comment 2 Marie-Luce Laflamme 2024-03-14 18:50:02 UTC
Suggestion of a test plan


Required settings
    Enable the native ILL module and the necessary backend code before testing.

Test plan
1- Created a new ILL_NEW_REQUEST template in (tools > Notices & slips)

e.g.
     template code: ILL_NEW_REQUEST
    
   and message like:
      "A new interlibrary loan request from a patron is awaiting for approval.
      Request ID [%    illrequest.illrequest_id %] .

      Please review this request:
      [% ill_full_metadata %]"


2- Add ILL template codes in the system preference "ILLSendStaffNotices"
         ILL_REQUEST_CANCEL|ILL_REQUEST_MODIFIED||ILL_NEW_REQUEST
3- Add your email in the system preference "ILLDefaultStaffEmail"
4- Login in to the OPAC
5- Go to the «Interlibrary request» section
6- Place a request
7- Check the message_queue in a terminal
---> At the moment, Koha is not generating the "ILL_NEW_REQUEST" email  (issue)
---> it should be added to the message_queue
8- Return to the OPAC
9- Modify the ILL request and save the changes
10- Check your email inbox
--> Koha is sending correctly the ILL_REQUEST_MODIFIED email to staff
11- Go back to the OPAC and cancel the ILLrequest.
12- Check your email inbox
--> Koha is sending correctly the ILL_REQUEST_CANCEL email to staff
Comment 3 Lisette Scheer 2024-06-10 19:27:15 UTC
*** Bug 36551 has been marked as a duplicate of this bug. ***
Comment 4 Pedro Amorim 2025-02-13 14:17:11 UTC
*** Bug 39129 has been marked as a duplicate of this bug. ***
Comment 5 Mathieu Saby 2025-02-13 14:32:54 UTC
Yes, it is needed, like for acquisition suggestions ;-)
Comment 6 Jeremy Evans 2025-02-25 15:29:25 UTC
We would support this. It would help us to be able to react to incoming requests, particularly when our users start submitting more ILL requests directly into Koha via forms in the OPAC or EBSCO Discovery. Also if suppliers such as Reprintsdesk report issues with anything requested in Koha via the API staff can respond in a timely manner.