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 <tomascohen@theke.io>
This commit is contained in:
Pedro Amorim 2023-08-07 13:02:34 +00:00 committed by Tomas Cohen Arazi
parent c813e7ed6d
commit a1e6468181
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 8 additions and 7 deletions

View File

@ -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 ) {