[Bug 18285] New: Koha::Database schema cache accessors
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Bug ID: 18285 Summary: Koha::Database schema cache accessors Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: olli-antti.kivilahti@jns.fi QA Contact: testopia@bugs.koha-community.org Safe way of getting and flushing the $database->{schema} -cache. This is needed by Test::DBIx::Class to overcome pre-initialization connection caching from C4::Context and others. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 --- Comment #1 from Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> --- Created attachment 61185 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61185&action=edit Bug 18285 - Koha::Database schema cache accessors Safe way of getting and flushing the $database->{schema} -cache. This is needed by Test::DBIx::Class to overcome pre-initialization connection caching from C4::Context and others. See Buug 18286 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18286 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18286 [Bug 18286] Test::DBIx::Class connection/schema is shadowed by a cached connection/schema -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |olli-antti.kivilahti@jns.fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18226 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18226 [Bug 18226] Remove "use Test::DBIx::Class" instantiations' dangerous code duplication -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch --- Comment #2 from Marc Véron <veron@veron.ch> --- I have the impression that 18226 can be removed from 'Blocks' because 18286 blocks 18226 as well (see dependency graph https://bugs.koha-community.org/bugzilla3/showdependencygraph.cgi?id=18285) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18285 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61185|0 |1 is obsolete| | --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 62967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=62967&action=edit Bug 18285: Koha::Database schema cache accessors Safe way of getting and flushing the $database->{schema} -cache. This is needed by Test::DBIx::Class to overcome pre-initialization connection caching from C4::Context and others. See Bug 18286. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62967|0 |1 is obsolete| | --- Comment #4 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63886&action=edit [SIGNED-OFF] Bug 18295: C4::Items - get_itemnumbers_of The code from scripts and subroutines using this subroutine was not very elegant. Most of the time the code was unnecessarily complex. This patch removes this subroutine and adapt the code to use Koha::Items instead. 1. C4::Items::get_hostitemnumbers_of I did not understand why the code was so complicated, it seems that we only want to know if a given item has a given biblionumber 2. cataloguing/merge.pl We want to retrieve the itemnumber for a given biblio. We could also have done that with: Koha::Biblios->find( $biblionumber )->items; 3. labels/label-item-search.pl We want to loop over the items for a given biblio, no need to use get_itemnumbers_of and GetItemInfosOf. We just need to use: Koha::Items->search({ biblionumber => $biblionumber }) 4. reserve/request.pl We want to retrieve the itemnumbers of the biblio's items We could also have done that with: Koha::Biblios->find( $biblionumber )->items->get_column('itemnumber'); Test plan: 1.You need to create analytical record relationships ( EasyAnalyticalRecords needs to be set). Link an item to a biblio using the 'Edit > Link to host item' menu from the biblio detail page. 2. Merge two bibliographic records (with items), the resulting record should contain items from both original records 3. Create a new label batch, edit it. Add items to this batch ('Add items' button). Fill the input with a barcode. You should see all the items of a biblio. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com Attachment #63886|0 |1 is obsolete| | --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 63886 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63886 [SIGNED-OFF] Bug 18295: C4::Items - get_itemnumbers_of Sorry wrong bug number -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62967|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=18285 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=18285 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #62967|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64003&action=edit Bug 18285: Koha::Database schema cache accessors Safe way of getting and flushing the $database->{schema} -cache. This is needed by Test::DBIx::Class to overcome pre-initialization connection caching from C4::Context and others. See Bug 18286. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 17.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18285 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #8 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Enhancement not pushed to 17.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org