[Bug 16431] New: Marc subfield structure should be cached using Koha::Cache
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Bug ID: 16431 Summary: Marc subfield structure should be cached using Koha::Cache Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 13074 Blocks: 7172, 8089 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7172 [Bug 7172] Omnibus for Plack variable scoping problems https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8089 [Bug 8089] Use Koha::Cache everywhere https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13074 [Bug 13074] C4::Items::_build_default_values_for_mod_marc should use Koha::Cache -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 51139 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51139&action=edit Bug 16431: Use Koha::Cache to cache marc subfield structure The marc subfield structure is currently cached using a global variable of C4::Context. The infos are retrieved every time a new context is created. This patch suggests to use Koha::Cache instead. To achieve this goal, a new subroutine is created C4::Biblio::GetMarcSubfieldStructure, it will be called from code which needs to get the marc subfield structure. GetMarcFromKohaField, GetMarcSubfieldStructureFromKohaField, TransformKohaToMarc and _get_inverted_marc_field_map are modified accordingly and the cache is cleared when the table is updated (from the 3 pl scripts modified by this patch). The caching done in C4::Context (marcfromkohafield) is removed. Test plan: Play with the marc subfield structure (in the administration module), then add and edit records and make sure everything went fine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |abl@biblos.pk.edu.pl, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16365 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |bgkriegel@gmail.com --- Comment #2 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Master is moving fast fatal: sha1 information is lacking or useless (admin/biblio_framework.pl). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 16431: Use Koha::Cache to cache marc subfield structure -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Sorry, forgot the dependency. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Medium patch 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=16431 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51139|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 51380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51380&action=edit Bug 16431: Use Koha::Cache to cache marc subfield structure The marc subfield structure is currently cached using a global variable of C4::Context. The infos are retrieved every time a new context is created. This patch suggests to use Koha::Cache instead. To achieve this goal, a new subroutine is created C4::Biblio::GetMarcSubfieldStructure, it will be called from code which needs to get the marc subfield structure. GetMarcFromKohaField, GetMarcSubfieldStructureFromKohaField, TransformKohaToMarc and _get_inverted_marc_field_map are modified accordingly and the cache is cleared when the table is updated (from the 3 pl scripts modified by this patch). The caching done in C4::Context (marcfromkohafield) is removed. Test plan: Play with the marc subfield structure (in the administration module), then add and edit records and make sure everything went fine. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Everything works as expected on my functional tests. I'm really happy to see the patch introduces relevant tests for previously untested functions. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51380|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 52813 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52813&action=edit Bug 16431: Use Koha::Cache to cache marc subfield structure The marc subfield structure is currently cached using a global variable of C4::Context. The infos are retrieved every time a new context is created. This patch suggests to use Koha::Cache instead. To achieve this goal, a new subroutine is created C4::Biblio::GetMarcSubfieldStructure, it will be called from code which needs to get the marc subfield structure. GetMarcFromKohaField, GetMarcSubfieldStructureFromKohaField, TransformKohaToMarc and _get_inverted_marc_field_map are modified accordingly and the cache is cleared when the table is updated (from the 3 pl scripts modified by this patch). The caching done in C4::Context (marcfromkohafield) is removed. Test plan: Play with the marc subfield structure (in the administration module), then add and edit records and make sure everything went fine. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Everything works as expected on my functional tests. I'm really happy to see the patch introduces relevant tests for previously untested functions. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 16.11, thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr Status|Pushed to Master |Pushed to Stable --- Comment #7 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.02. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |17201 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17201 [Bug 17201] Remaining calls to C4::Context->marcfromkohafield -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17201 Depends on|17201 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17201 [Bug 17201] Remaining calls to C4::Context->marcfromkohafield -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Hugo Agud <hagud@orex.es> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16744 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16431 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16744 | CC| |hagud@orex.es --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 16744 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org