Bug 41281 - ILL request metadata doesn't show if falsy
Summary: ILL request metadata doesn't show if falsy
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-21 15:48 UTC by Pedro Amorim
Modified: 2025-11-25 13:27 UTC (History)
5 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41281: Only skip metadata if empty or undefined (1.74 KB, patch)
2025-11-21 15:53 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 41281: Only skip metadata if empty or undefined (1.79 KB, patch)
2025-11-24 16:16 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2025-11-21 15:48:49 UTC
If an illrequestattribute happens to have the intentional value of '0' it is not shown.
Comment 1 Pedro Amorim 2025-11-21 15:53:15 UTC
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.
Comment 2 Pedro Amorim 2025-11-24 16:16:38 UTC
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>
Comment 3 Jan Kissig 2025-11-25 13:27:48 UTC
As meta.value gets only printed, and therefore is not evaluated, the whole check could also be omitted.