Description
Martin Renvoize (ashimema)
2024-07-10 13:10:19 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. 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. Created attachment 181981 [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 181982 [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. Just a quick rebase to confirm this all still applies after the tidy Created attachment 183540 [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 183541 [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. Created attachment 183545 [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. Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 183546 [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. Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Tested and moved along as part of bug 39545. The QA tool tells me this is not tidy: Processing files [RUNNING] C4/Biblio.pm [RUNNING] Koha/Biblio.pm [RUNNING] cataloguing/addbiblio.pl [PASS] cataloguing/addbiblio.pl [FAIL] Koha/Biblio.pm [PASS] C4/Biblio.pm Result: [PASS] C4/Biblio.pm [FAIL] Koha/Biblio.pm FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl Koha/Biblio.pm` [PASS] cataloguing/addbiblio.pl Created attachment 183598 [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. Sponsored-by: Open Fifth <https://openfifth.co.uk> Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 183599 [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. Sponsored-by: Open Fifth <https://openfifth.co.uk> Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> I've fixed my commit hook now.. appologies. I believe that t/db_dependent/Koha/Biblio.t tests are failing with this applied. Please check. Created attachment 183755 [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. Sponsored-by: Open Fifth <https://openfifth.co.uk> Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 183756 [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. Sponsored-by: Open Fifth <https://openfifth.co.uk> Signed-off-by: Heather Hernandez <flyingendpaper@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 183757 [details] [review] Bug 37305: (follow-up) Only add control number subfield when defined The previous commit introduced a bug where the control number subfield 'w' was being added to the MARC field even when undefined, causing test failures. This patch adds a condition to only push the control number subfield when the value is actually defined, matching the pattern used for other subfields in the method. Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> |