From 218c7dca71163fe31340f5aed30443020fe3e14d Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Thu, 20 Feb 2025 11:10:17 +0000 Subject: [PATCH] Bug 39175: Fix Attributes->Attribute Bug introduced in FreeForm prior to adding it to core in this commit: https://github.com/PTFS-Europe/koha-ill-freeform/commit/369dffb159f1e70162b685b473dcf26c76f7e7e7#diff-662970ddc6f6828afd23e6823399a4a32807c4a6c487a0aff86c9d116f60797dR806 It should've been Koha::Illrequestattribute into Koha::ILL::Request::Attribute not Koha::ILL::Request::Attributes To test, k-t-d: 1) Enable ILLModule syspref 2) Edit the only patron in k-t-d with the 'Interlibrary loan' category: /cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16 3) Add a valid e-mail address to 'Primary email:' 4) Create a new ILL request: /cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 5) Add any type, any valid patron cardnumber, any library. Click 'Create'. 6) Click 'Place request with partners' 7) Pick the only available partner library 'FRL-Walker' 8) Click 'Send email'. 9) Notice you get an error. Apply patch & restart plack. Repeat. 10) Confirm the there's no error and message was queue as expected: $ select * from message_queue; --- Koha/ILL/Backend/Standard.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/ILL/Backend/Standard.pm b/Koha/ILL/Backend/Standard.pm index be84568b5fc..4f8f3a5adef 100644 --- a/Koha/ILL/Backend/Standard.pm +++ b/Koha/ILL/Backend/Standard.pm @@ -796,7 +796,7 @@ sub _set_requested_partners { type => 'requested_partners' }; Koha::ILL::Request::Attributes->search($where)->delete(); - Koha::ILL::Request::Attributes->new( + Koha::ILL::Request::Attribute->new( { illrequest_id => $args->{request}->id, column_exists( 'illrequestattributes', 'backend' ) ? ( backend => "Standard" ) : (), -- 2.39.5