https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41091 --- Comment #10 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Created attachment 212427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212427&action=edit Bug 41091: Only show 'Supplying agencies' when a backend sends ISO18626 requests Supplying agencies are only used by ILL backends that send ISO 18626 requests through Koha::ILL::ISO18626::Requester. Backends now declare this with the iso18626_requesting capability, /api/v1/ill/config lists them in ISO18626RequestingBackends, and the 'Supplying agencies' menu item is only shown when there is at least one. Test plan, using one KTD as both the requesting and the supplying library, with the koha-ill-iso18626 plugin 2.0.0 as the backend: Setup 1) Apply the patches, run updatedatabase, yarn build, restart plack 2) Install the koha-ill-iso18626 plugin 2.0.0 (https://github.com/openfifth/koha-ill-iso18626), restart plack 3) System preferences: 'ILLModule' Enable, 'ISO18626AgencyId' GB-KTD, 'RESTPublicAPI' Enable, 'RESTPublicAnonymousRequests' Allow, 'RESTBasicAuth' Enable 4) Go to http://localhost:8081/cgi-bin/koha/ill/iso18626_requesting_agencies and add a requesting agency: ILL partner Walker, type ISIL, account ID ktd, security code ktd, callback endpoint http://localhost:8081/api/v1/public/ill/iso18626 5) Go to http://localhost:8081/cgi-bin/koha/ill/iso18626_supplying_agencies and add a supplying agency: name 'KTD loopback', type ISIL, agency ID GB-KTD, account ID ktd, security code ktd, endpoint http://localhost:8081/api/v1/public/ill/iso18626 6) Manage plugins > ISO18626 > Actions > 'Configure', for 'KTD loopback' set 'API username' koha and 'API password' koha, save Menu 7) Go to http://localhost:8081/cgi-bin/koha/ill/ill.pl - 'Borrowing' has 'Supplying agencies' (the ISO18626 plugin provides iso18626_requesting) 8) Disable the ISO18626 plugin (Administration > Manage plugins), reload ill.pl - 'Supplying agencies' is gone 9) Enable the plugin again Plugin config 10) Manage plugins > ISO18626 > Actions > 'Configure' - 'KTD loopback' is listed with its endpoint, 'API username' is koha - the 'Supplying agencies' link opens http://localhost:8081/cgi-bin/koha/ill/iso18626_supplying_agencies - no endpoint/account ID/security code fields - change 'Document host', 'Save configuration', reopen, notice it's kept Staff request (AutoILLBackendPriority) 11) Set 'AutoILLBackendPriority' to ISO18626 only 12) Go to http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard Type 'Book', title 'Perl best practices', card number 42, any library, 'Make request' - the backend selection screen suggests ISO18626 as available 13) Confirm ISO18626 - the item selection lists 'Perl best practices' from 'KTD loopback', with call number, barcode and availability; 'Service type' defaults to 'Copy or loan' 14) Pick 'Copy' and request an item, notice status 'New' 15) Click 'Place request', notice status 'Requested' - 'ISO18626 messages' lists 'request', tick 'Show confirmations' for 'requestConfirmation' - 'View message' on the request: header supplyingAgencyId and requestingAgencyId are GB-KTD Supplier reply 16) Go to http://localhost:8081/cgi-bin/koha/ill/iso18626_requests, open the new request, click 'Expect to supply copy' 17) Back on the ILL request: status 'Supplier expects to supply', 'supplyingAgencyMessage' in the messages Document 18) Set 'OPACBaseURL' to http://localhost:8080 (download links are built from it) 19) On the supplier request, 'Copy completed' and attach a PDF 20) ILL request: status 'Copy completed', 'Retrieve document', notice 'Document received' Cancel 21) Repeat 12) to 15) with title 'Programming the Perl DBI', have the supplier click 'Expect to supply copy', then on the ILL request click 'Request cancellation' - status 'Cancellation requested', messages show 'requestingAgencyMessage' + an OK confirmation OPAC 22) Log into the OPAC as koha, go to http://localhost:8080/cgi-bin/koha/opac-illrequests.pl?method=create&backend=Standard request 'Perl best practices', ISO18626 is suggested, continue, pick an item and 'Request this item' - the request is created; in the staff interface it's status 'New' and 'Place request' sends it Tests 23) prove t/db_dependent/Koha/ILL/ISO18626/Requester.t t/db_dependent/api/v1/ill_config.t 24) yarn cypress run --spec t/cypress/integration/ILL/SupplyingAgencies.ts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.