Bugzilla – Attachment 182833 Details for
Bug 40024
Backends that don't support get_requested_partners capability show a '(0)' in status
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40024: Update requested_partners check
Bug-40024-Update-requestedpartners-check.patch (text/plain), 2.76 KB, created by
Pedro Amorim
on 2025-05-29 12:31:40 UTC
(
hide
)
Description:
Bug 40024: Update requested_partners check
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-05-29 12:31:40 UTC
Size:
2.76 KB
patch
obsolete
>From f05eb6fa9a743adeff0c1a65c6393c5d33befa33 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Thu, 29 May 2025 11:49:29 +0000 >Subject: [PATCH] Bug 40024: Update requested_partners check > >Test plan, k-t-d, don't apply patch: >1) Enable ILLModule >2) Install a backend that does not provide the 'get_requested_partners' capability, e.g. the libkey lending tool (IncDocs) backend plugin: > https://github.com/openfifth/koha-ill-libkey-lending-tool/releases/tag/v2.0.3 >3) Restart plack > $ koha-plack --restart kohadev >4) Create a new IncDocs ILL request: > <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=IncDocs >5) Add a DOI '123', a cardnumber '42' and any library. Click 'Make request'. >6) You should now be on the 'Manage request' page. Notice there's a '(0)' after the status 'New request'. This happens because '_backend_capability' method returns '0' if the backend does not implement the capability. The template checks for 'length', and length of '0' is '1'. >7) Apply patch. Refresh the 'Manage request' page. Notice the '(0)' is no longer shown. > >Additional testing, ensure no regression is added: >1) Edit the only ILL partner present in k-t-d: > <staff_url>/cgi-bin/koha/members/memberentry.pl?op=edit_form&destination=circ&borrowernumber=16 >2) Add a 'primary email'. Click 'Save'. >3) Do the same but for a Standard request: > <staff_url>/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard >4) Add a type, a cardnumber '42' and any library. Click 'Make request'. >5) You should now be on the 'Manage request' page. Click 'Place request with partners'. Select the only one available 'FRL - Walker' and click 'Send email'. >6) Notice the status shows 'Requested from partners (<the_email_you_entered_in_step_2)'. This is the expected behavior and working as before. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >index 26ba077ed94..9113130c7ca 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt >@@ -624,7 +624,7 @@ > [% request.statusalias.lib | html %] > [% ELSE %] > [% request.capabilities.$req_status.name | html %] >- [% IF request.requested_partners.length > 0 %] >+ [% IF request.requested_partners %] > ([% request.requested_partners | html %]) > [% END %] > [% END %] >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 40024
:
182833
|
182892