[Bug 39158] New: Reduce code duplication in marc_records_to_documents
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Bug ID: 39158 Summary: Reduce code duplication in marc_records_to_documents Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: glasklas@gmail.com QA Contact: testopia@bugs.koha-community.org There is currently a block in Koha::SearchEngine::Elasticsearch::marc_records_to_documents that in my opinion should be brokwn out to its own method for increased maintainability and readability. It's easily done that these two blocks will drift apart with time (when they should be the same), fixing a bug in one place, forgetting in another etc. Here is a patch to fix this. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #1 from David Gustafsson <glasklas@gmail.com> --- Created attachment 178302 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178302&action=edit Bug 39158: Reduce code duplication in marc_records_to_documents Refactor marc_record_to_documents to avoid code duplicaiton. To test: 1) Verify tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t all pass 2) Apply patch 3) Veriy tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t still pass -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |glasklas@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Ludovic <ludovic.julien@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ludovic.julien@inLibro.com Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #2 from Ludovic <ludovic.julien@inLibro.com> --- I tested the patch and all tests in t/db_dependent/Koha/SearchEngine/Elasticsearch.t pass. Having cleaner code like this is always helpful and appreciated. Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 David Gustafsson <glasklas@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178302|0 |1 is obsolete| | --- Comment #3 from David Gustafsson <glasklas@gmail.com> --- Created attachment 189831 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189831&action=edit Bug 39158: Reduce code duplication in marc_records_to_documents Refactor marc_record_to_documents to avoid code duplicaiton. To test: 1) Verify tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t all pass 2) Apply patch 3) Veriy tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t still pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #4 from David Gustafsson <glasklas@gmail.com> --- Rebased against master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |domm@plix.at QA Contact|testopia@bugs.koha-communit |domm@plix.at |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #5 from Thomas Klausner <domm@plix.at> --- Created attachment 196303 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196303&action=edit Bug 39158: (QA follow-up) Fixing POD Patch from commit 55de0f9 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #6 from Thomas Klausner <domm@plix.at> --- Test works, code looks sane, fixed a small POD error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189831|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #196303|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #7 from Thomas Klausner <domm@plix.at> --- Created attachment 196304 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196304&action=edit Bug 39158: Reduce code duplication in marc_records_to_documents Refactor marc_record_to_documents to avoid code duplicaiton. To test: 1) Verify tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t all pass 2) Apply patch 3) Veriy tests in t/db_dependant/Koha/SearchEngine/Elasticsearch.t still pass Signed-off-by: Thomas Klausner <domm@plix.at> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #8 from Thomas Klausner <domm@plix.at> --- Created attachment 196305 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=196305&action=edit Bug 39158: (QA follow-up) Fixing POD Signed-off-by: Thomas Klausner <domm@plix.at> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39158 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting --- Comment #10 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- This will not be backported to 25.11.x due to it being deemed an enhancement or a dependancy not being met -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org