Bug 22439 - Duplicated code in PrepHostMarcField and prepare_host_field
Summary: Duplicated code in PrepHostMarcField and prepare_host_field
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-01 09:06 UTC by paxed
Modified: 2019-03-04 08:17 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2019-03-01 09:06:13 UTC
The C4/Biblio.pm subroutines PrepHostMarcField and prepare_host_field both do the same thing, so should be merged.
Comment 1 paxed 2019-03-04 08:17:28 UTC
In addition:

1) prepare_host_field: if ( $field = $host->field('100') || $host->field('110') || $host->field('11') ) - the '11' should be '111'

2) prepare_host_field has a 240 -> 773b, which should be 250a -> 773b, as it is in PrepHostMarcField

3) There's a difference in how the 773a is set: prepare_host_field uses 100ab | 110ab | 11ab, but PrepHostMarcField uses 100a | 110a | 111a