From e398f283daed4dff7cad06b0a330c8159a8b13b3 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 --- 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 a549d9cd5b..189d904a29 100755 --- a/ill/ill-requests.pl +++ b/ill/ill-requests.pl @@ -299,13 +299,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.30.2