[Koha-bugs] [Bug 25006] Koha::Item->as_marc_field generates undef subfields
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Mar 30 12:41:23 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25006
--- Comment #6 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 102078
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=102078&action=edit
Bug 25006: Make Koha::Item->as_marc_field skip undefined subfields
This patch makes as_marc_field skip subfields that don't have a value or
contains an empty string (replicating C4::Items:1021 logic).
To test:
1. Apply the regression tests patch
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Item.t
=> FAIL: Tests fail because the generated MARC::Field contains undef
subfields.
3. Apply this patch
4. Repeat 2.
=> SUCCESS: Tests pass! Undefined and empty subfields are skipped!
5. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
Signed-off-by: David Nind <david at davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list