[Bug 18295] New: Koha::Biblio - Remove get_itemnumbers_of
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Bug ID: 18295 Summary: Koha::Biblio - Remove get_itemnumbers_of Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: enhancement 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 Blocks: 18093, 18279 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18093 [Bug 18093] Add the Koha::Objects->get_column method https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18279 [Bug 18279] C4::Items - Remove GetLostItems -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18296 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 [Bug 18296] Koha::Biblio - Remove GetItemInfosOf -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha::Biblio - Remove |C4::Items - Remove |get_itemnumbers_of |get_itemnumbers_of -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 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.
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=18295 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61225&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18252 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18252 [Bug 18252] Move C4::Items code to the Koha namespace -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl Blocks|18093 | Depends on| |18093 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Dependency with 18093 is the other way around Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18093 [Bug 18093] Add the Koha::Objects->get_column method -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Bug 18295 depends on bug 18093, which changed state. Bug 18093 Summary: Add the Koha::Objects->get_column method https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18093 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |josef.moravec@gmail.com --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- fatal: sha1 information is lacking or useless (C4/Items.pm) -- 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=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61225|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 63111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63111&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 --- Comment #5 from Josef Moravec <josef.moravec@gmail.com> --- you can probably remove import of C4::Items from labels/label-item-search.pl, the only one imported routine GetItemInfosOf was removed in refactored code... Otherwise everything looks OK -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 --- Comment #6 from Josef Moravec <josef.moravec@gmail.com> --- (In reply to Josef Moravec from comment #5)
you can probably remove import of C4::Items from labels/label-item-search.pl, the only one imported routine GetItemInfosOf was removed in refactored code...
Now looking to bug 18296, you are removing it here, so ok, I am signing of ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 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.
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=18295 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63111|0 |1 is obsolete| | --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63887 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63887&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> https://bugs.koha-community.org/show_bug.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=18295 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- 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=18295 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 63917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63917&action=edit 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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> bsoletes: 63887 - [SIGNED-OFF] Bug 18295: C4::Items - get_itemnumbers_of -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- 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=18295 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63887|0 |1 is obsolete| | Attachment #63917|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 63918 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63918&action=edit 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> 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=18295 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: Looks good to me. Being liberal on unit tests here, but I know some QAers would certainly fail qa on this patch because get_hostitemnumbers_of is changed but not tested :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #11 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=18295 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It looks like this was pushed to 17.05? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #12)
It looks like this was pushed to 17.05?
Oups, I've reverted. This is big refactoring, not good for stable branch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 --- Comment #14 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org