Bug 37305 - Remove C4::Biblio::prepare_marc_host and use Koha::Biblio->generate_marc_host_field in preference
Summary: Remove C4::Biblio::prepare_marc_host and use Koha::Biblio->generate_marc_host...
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on: 37364
Blocks: 22439
  Show dependency treegraph
 
Reported: 2024-07-10 13:10 UTC by Martin Renvoize (ashimema)
Modified: 2024-07-17 10:13 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:
Circulation function:


Attachments
Bug 37305: Subfield order matters (7.25 KB, patch)
2024-07-17 10:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 37305: Remove C4::Biblio::prepare_host_field (5.54 KB, patch)
2024-07-17 10:07 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2024-07-10 13:10:19 UTC
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.
Comment 1 Martin Renvoize (ashimema) 2024-07-17 10:07:33 UTC
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.
Comment 2 Martin Renvoize (ashimema) 2024-07-17 10:07:36 UTC
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.