https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31224
--- Comment #71 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 174262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=174262&action=edit Bug 31224: Move item field removal up to $metadata->record This patch addresse the fact Koha needs to strip out stray item field in MARC records coming from the DB. While this is not ideal, it has worked so far, limiting the negative effects of bad data to Koha users. I put a FIXME because I think it deserves to be revisited colectively at some point. I filed bug 38406 to track the discussion around this. The `marcmarcrecord2csv.t` tests cover this behavior and I thought removing it was not in the scope of this bug. I decided to move the removal one step up in the call chain so it applies to all calls to `$metadata->record`, not only those that ask to include items. This is the right thing to do while we keep this behavior. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Record/marcrecord2csv.t => FAIL: Item information gets extracted from more items than expected (i.e. the item in the MARC record is not stripped out so 'Withdrawn' shows 3 times instead of 2). 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests pass! 4. Run: k$ prove t/db_dependent/Koha/Biblio/Metadata.t => SUCCESS: Tests pass! The behavior change in $metadata->record works as intended! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
