[Bug 18296] New: Koha::Biblio - Remove GetItemInfosOf
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Bug ID: 18296 Summary: Koha::Biblio - Remove GetItemInfosOf 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 Depends on: 18295 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 [Bug 18295] Koha::Biblio - Remove 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=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Koha::Biblio - Remove |C4::Items - Remove |GetItemInfosOf |GetItemInfosOf -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 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=18296 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61224 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61224&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=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61224|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61226 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61226&action=edit Bug 18296: C4::Items - Remove GetItemInfosOf At this point this subroutine is only used once, from reserve/request.pl. Since we already have the items, it's easy to populate the different hashes as the rest of the code is expecting it. Test plan: 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.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 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=18296 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=18296 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #61226|0 |1 is obsolete| | --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 63888 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63888&action=edit [SIGNED-OFF] Bug 18296: C4::Items - Remove GetItemInfosOf At this point this subroutine is only used once, from reserve/request.pl. Since we already have the items, it's easy to populate the different hashes as the rest of the code is expecting it. Test plan: 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.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
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=18296 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Cannot apply this on top of 18295. Regardless of applying 18279 in between or not. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63888|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 63944 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=63944&action=edit Bug 18296: C4::Items - Remove GetItemInfosOf At this point this subroutine is only used once, from reserve/request.pl. Since we already have the items, it's easy to populate the different hashes as the rest of the code is expecting it. Test plan: 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.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
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=18296 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #4)
Cannot apply this on top of 18295. Regardless of applying 18279 in between or not.
It applied ok for me, reattached anyway 1c01bbb112 Bug 18296: C4::Items - Remove GetItemInfosOf 81caf630f1 Bug 18295: C4::Items - get_itemnumbers_of 5d94ff7513 DBRev 17.05.00.000 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #6)
(In reply to Marcel de Rooy from comment #4)
Cannot apply this on top of 18295. Regardless of applying 18279 in between or not.
It applied ok for me, reattached anyway
1c01bbb112 Bug 18296: C4::Items - Remove GetItemInfosOf 81caf630f1 Bug 18295: C4::Items - get_itemnumbers_of 5d94ff7513 DBRev 17.05.00.000
Current master now: Applying: Bug 18296: C4::Items - Remove GetItemInfosOf fatal: sha1 information is lacking or useless (C4/Items.pm). Repository lacks necessary blobs to fall back on 3-way merge. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #63944|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64050&action=edit Bug 18296: C4::Items - Remove GetItemInfosOf At this point this subroutine is only used once, from reserve/request.pl. Since we already have the items, it's easy to populate the different hashes as the rest of the code is expecting it. Test plan: 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.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
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=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- It applies now! Thanks. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64050|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 64073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64073&action=edit Bug 18296: C4::Items - Remove GetItemInfosOf At this point this subroutine is only used once, from reserve/request.pl. Since we already have the items, it's easy to populate the different hashes as the rest of the code is expecting it. Test plan: 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.
From the staff interface place a hold on the biblio. You should see the items from the biblio and the one you just linked
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=18296 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=18296 --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 64106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64106&action=edit Bug 18296: Remove perlcritic error (request.pl) "$itemnumbers_of_biblioitem" is declared but not used at line 314, column 5. Unused variables clutter code and make it harder to read. (Severity: 3) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Last patch pushed to master! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldjamison@marywood.edu --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** Bug 18753 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18296 Bug 18296 depends on bug 18295, which changed state. Bug 18295 Summary: C4::Items - Remove get_itemnumbers_of https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18295 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=18296 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED CC| |fridolin.somers@biblibre.co | |m --- Comment #15 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