It should be possible for the Interlibrary Loans module to inform a user when a request supplier makes a pertinent change to an outstanding request. Scenario defined by customer to be fulfilled by this bug: - A user places an ILL request for a journal article via the RapidILL backend. - RapidILL fulfil the request with an electronic resource. - The user is notified of the request fulfilment via their chosen communication method, the notice contains the link and password required to access the requested resource. The intended solution will add a mechanism to allow Koha ILL to periodically check outstanding requests with suppliers for updates and act accordingly. As an aside, there is a known customer requirement for notices to be sent when requests are modified locally, this requirement will be catered for in the design of the solution. Details of the intended implementation: - An ILL backend, or core Koha ILL, can define one or more "update processors", these are functions that can perform an action when supplied with an update meeting the criteria they're interested in - An ILL request will be given the ability to obtain its latest status with the supplier, known as an "update" - "Updates" can then be passed to "update processors" that are interested in them, which can then perform whatever actions they wish. Generic - Core Koha ILL will provide: - An object to encapsulate supplier updates - A base class from which "update processors" can be subclassed - Functions to gather updates from backends and orchestrate the processing - A notice template which will be used to send update notices - A shell script that can be run to initiate the process For the customer use case defined above: - The RapidILL backend will: - Provide the ability to retrieve the latest update from the RapidILL API - Define a SendArticleLink processor
Created attachment 133394 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences
Created attachment 133395 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors
Created attachment 133396 [details] [review] Bug 30484: Add unit tests
Created attachment 133399 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences
Created attachment 133400 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors
Created attachment 133401 [details] [review] Bug 30484: Add unit tests
TEST PLAN: This test plan tests the provided functionality by using a mocked update supplied by the FreeForm backend. The command line script is run which will look for requests that match the supplied criteria, obtain a mocked update from them, and process the update. The processor simply prints the message supplied in the update to the screen. - Ensure you have Interlibrary Loans turned on and have the FreeForm backend installed. It is important you are using the "bug_30484_mock_request_update" branch of the FreeForm backend as this enables the backend to provide mock updates that this functionality uses. - Create a FreeForm ILL request - On the "Manage ILL request" page for the newly created request, click the "Confirm request" button, thereby setting the request status to "Requested" - Run the script, in the "misc" directory, run: perl process_ill_updates.pl --statuses REQ --backend FreeForm - TEST: You should see the following: - The message "This is a mock update from the FreeForm backend" - The following run report: Run details: Request ID: xxx Processing by: FreeForm Number of processors run: 1 Processor details: Processor name: Print to STDERR Success messages: PRINTED Error messages: - If the above messages were printed, the test plan can be considered successful.
Revised test plan: This test plan tests the provided functionality by using a mocked update supplied by the FreeForm backend. The command line script is run which will look for requests that match the supplied criteria, obtain a mocked update from them, and process the update. The processor simply prints the message supplied in the update to the screen. - Ensure you have Interlibrary Loans turned on and have the FreeForm backend installed. It is important you are using the "bug_30484_mock_request_update" branch of the FreeForm backend as this enables the backend to provide mock updates that this functionality uses. - Ensure that the patron that will be creating the request has the "Interlibrary loan updated" notice enabled for at least "Email" - Create a FreeForm ILL request - On the "Manage ILL request" page for the newly created request, click the "Confirm request" button, thereby setting the request status to "Requested" - Run the script, in the "misc" directory, run: perl process_ill_updates.pl --statuses REQ --backend FreeForm - TEST: You should see the following: - The message "This is a mock update from the FreeForm backend" - The following run report: Run details: Request ID: xxx Processing by: FreeForm Number of processors run: 1 Processor details: Processor name: Print to STDERR Success messages: PRINTED Error messages: - If the above messages were printed, the test plan can be considered successful.
Set this back to assigned as I'd forgotten it needs forward porting onto master before it can be QA'ed, it was developed against 21.11
Created attachment 134486 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences
Created attachment 134487 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors
Created attachment 134488 [details] [review] Bug 30484: Add unit tests
Now setting back to Needs signoff, forward ported to master
Created attachment 134569 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences
Created attachment 134570 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors
Created attachment 134571 [details] [review] Bug 30484: Add unit tests
Created attachment 134572 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Sponsored-by: University of Hertfordshire
Created attachment 134573 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Sponsored-by: University of Hertfordshire
Created attachment 134574 [details] [review] Bug 30484: Add unit tests Signed-off-by: Stephen Graham <s.graham4@herts.ac.uk> Sponsored-by: University of Hertfordshire
Created attachment 134626 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences
Created attachment 134627 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors
Created attachment 134628 [details] [review] Bug 30484: Add unit tests
(In reply to Andrew Isherwood from comment #8) > Revised test plan: > > This test plan tests the provided functionality by using a mocked update > supplied by the FreeForm backend. The command line script is run which will > look for requests that match the supplied criteria, obtain a mocked update > from them, and process the update. The processor simply prints the message > supplied in the update to the screen. > > - Ensure you have Interlibrary Loans turned on and have the FreeForm backend > installed. It is important you are using the "bug_30484_mock_request_update" > branch of the FreeForm backend as this enables the backend to provide mock > updates that this functionality uses. > - Ensure that the patron that will be creating the request has the > "Interlibrary loan updated" notice enabled for at least "Email" > - Create a FreeForm ILL request > - On the "Manage ILL request" page for the newly created request, click the > "Confirm request" button, thereby setting the request status to "Requested" > - Run the script, in the "misc" directory, run: > > perl process_ill_updates.pl --statuses REQ --backend FreeForm > > - TEST: You should see the following: > - The message "This is a mock update from the FreeForm backend" > - The following run report: > > Run details: > Request ID: xxx > Processing by: FreeForm > Number of processors run: 1 > Processor details: > Processor name: Print to STDERR > Success messages: PRINTED > Error messages: > > - If the above messages were printed, the test plan can be considered > successful. 1) Typo in updatedatabase: Kind Regards > Kind regards I've added a follow-up patch fixing this globally. 2) +=head3 append_to_note. I see it only appears in Illrequest.pm and has a test, but not sure how it relates to the functionality of this patch set? 3) Worked through the test plan and it works as described. The changes for messaging preferences appear to be complete, but we should start thinking about a way to make the list of message options configurable as not all libraries will offer all notices (totally a separate bug of course). Now we need another QA for the dependent bug 28909 to unlock!
Created attachment 138859 [details] [review] Bug 30484: Add ILL update notice Adds a new ILL_REQUEST_UPDATE notice which is to be used for the formation of notices informing users of updates to ILL requests. Commit includes database updates and template changes for messaging preferences Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=28909
Created attachment 138860 [details] [review] Bug 30484: Implement support for ILL request updates This commit adds support for the concept of ILL request update notices. - Adds a new Koha::Illrequest::SupplierUpdate class that is used to encapsulate an update to a request, this update may come from a supplier via a backend or from core ILL via, perhaps, a user action - Adds a new Koha::Illrequest::SupplierUpdateProcessor base class that can be subclassed in order to create a processor that can be passed an update and act accordingly. - Updates to Illrequest.pm to support the above classes and allow core Koha to offer update processors - A shell script to initiate a periodic process to check for updates meeting given criteria and run the appropriate processors Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=28909
Created attachment 138861 [details] [review] Bug 30484: Add unit tests Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> https://bugs.koha-community.org/show_bug.cgi?id=28909
Created attachment 138862 [details] [review] Bug 28909: (QA follow-up) Fix typo 'Kind Regards' Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to master for 22.11. Nice work everyone, thanks!
Enhancement will not be backported to 22.05.x series