If an illrequestattribute happens to have the intentional value of '0' it is not shown.
Created attachment 189861 [details] [review] Bug 41281: Only skip metadata if empty or undefined 1) Enable ILLModule 2) Create an ILL request: <staff_url>/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): <staff_url>/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.
Created attachment 189917 [details] [review] Bug 41281: Only skip metadata if empty or undefined 1) Enable ILLModule 2) Create an ILL request: <staff_url>/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): <staff_url>/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 <richard.bridgen@nhs.net>
As meta.value gets only printed, and therefore is not evaluated, the whole check could also be omitted.