We introduce the new method and add unit tests for it in bug 29560. We should now be able to remove the untested and non-object-oriented method from C4::Biblio. It would also be nice to start working toward merging UseControlNumber and EasyAnalytics and thus also remove the very similar C4::Biblio::PrepareMarcHost() method.
Created attachment 169078 [details] [review] Bug 37305: Subfield order matters This patch updates the use of a hash to store and then pass subfields to the MARC::Field new method to an array with key/value pairs using fat comma's. This allows us to maintain the integrity check that we're passing string as the first arguament in each pair whilst also allowing us to ensure fields are passed in the order they are found.
Created attachment 169079 [details] [review] Bug 37305: Remove C4::Biblio::prepare_host_field This patch updates the only use of prepare_host_field to use the well tested Koha::Biblio->generate_marc_host_field method instead and then removes the aforementioned prepare_host_field method from C4::Biblio. Test plan 1) Ensure the "enhanced workflow" for creating analytics still functions as expected.