From 62db27bc7cfb2b33546e6294bc55e698ca3c8a3c Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 21 Nov 2025 15:49:16 +0000 Subject: [PATCH] Bug 41281: Only skip metadata if empty or undefined 1) Enable ILLModule 2) Create an ILL request: /cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 3) Pick any type, add '42' for cardnumber and any library 4) Edit item metadata (assuming ID 1): /cgi-bin/koha/ill/ill-requests.pl?op=edititem&illrequest_id=1 5) Click 'Add new field' under 'Custom fields' 6) Add any value for 'key' e.g. "test" and '0' for value. 7) Click 'Update'. Notice the custom field doesn't show. 8) Apply patch. Refresh. Verify it shows now. Signed-off-by: Richard Bridgen Signed-off-by: Lisette Scheer Signed-off-by: Lucas Gass --- .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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 b503079701..3189db0288 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 @@ -750,12 +750,11 @@

Details from supplier ([% request.backend | html %])

    - [% FOREACH meta IN request.metadata.keys.sort('lower') %] - [% val = request.metadata.${meta} %] - [% IF val %] -
  1. - [% meta.replace('_',' ') | html %]: - [% val | html %] + [% FOREACH meta IN request.metadata %] + [% IF meta.value.defined && meta.value.length %] +
  2. + [% meta.key.replace('_',' ') | html %]: + [% meta.value | html %]
  3. [% END %] [% END %]