From a1e6468181f0188fa898b313f6504604788f750c Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Mon, 7 Aug 2023 13:02:34 +0000 Subject: [PATCH] Bug 33716: (QA follow-up) Update z39.50 availability search in 'Request from partners' screen Test plan: - Enable ILLCheckAvailability; - Enable ILLModule and install FreeForm - Update partner_code in koha-conf.xml to match the patron category being used ('IL' if on k-t-d) - Install and configure z39.50 availability plugin, link it to the patron ID ('16' if on k-t-d) - Add a valid e-mail address to the patron of 'IL' category - Create a new ILL request and go to 'Manage request' screen - Click 'Place request with partners' notice the label 'Partners available for searching: none' - Apply patch and refresh, notice a 'Search selected partners' button now shows up after you select the partner from the list This is a fix for a regression caused by the rest of the code in this bug. I'm submitting this here since this has not yet been pushed and the fix is quite self-explanatory Signed-off-by: Tomas Cohen Arazi --- ill/ill-requests.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ill/ill-requests.pl b/ill/ill-requests.pl index 06086307aa..8a4daf74cb 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -301,13 +301,14 @@ if ( $backends_available ) { # Prepare availability searching, if required # Get the definition for the z39.50 plugin if ( C4::Context->preference('ILLCheckAvailability') ) { - my $availability = Koha::Illrequest::Workflow::Availability->new($request->metadata); - my $services = $availability->get_services({ - ui_context => 'partners', - metadata => { - name => 'ILL availability - z39.50' - } - }); + my $availability = Koha::Illrequest::Workflow::Availability->new( + { + name => 'ILL availability - z39.50', + %{$request->metadata} + }, + 'partners' + ); + my $services = $availability->get_services(); # Only pass availability searching stuff to the template if # appropriate if ( scalar @{$services} > 0 ) { -- 2.39.5