[Bug 21184] New: C4::Items - Remove GetBarcodeFromItemnumber
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Bug ID: 21184 Summary: C4::Items - Remove GetBarcodeFromItemnumber 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 my $barcode = GetBarcodeFromItemnumber($itemnumber); will become: my $barcode = Koha::Items->find($itemnumber)->barcode; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 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=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |21183 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21183 [Bug 21183] C4::Items - Remove GetItemnumberFromBarcode -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 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=21184 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77589&action=edit Bug 21184: Replace C4::Items::GetBarcodeFromItemnumber calls Those calls to C4::Items::GetBarcodeFromItemnumber can be replaced with my $barcode = Koha::Items->find($itemnumber)->barcode; But if we are not sure that the item exists, we should test the return of ->find before ->barcode Test plan: - Edit an item - Check an item in - Test SIP - I do not really know how to trigger that code, apparently misc/sip_cli_emulator.pl does not deal with holds. Any ideas? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77590&action=edit Bug 21184: Remove GetBarcodeFromItemnumber Test plan: git grep GetBarcodeFromItemnumber should not return anything -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21201 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21201 [Bug 21201] C4::Items - Remove GetItemnumbersForBiblio -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21204 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21204 [Bug 21204] Move C4::Acquisition 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=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|21204 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21204 [Bug 21204] Move C4::Acquisition 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=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21206 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21206 [Bug 21206] C4::Items - Remove GetItem -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 --- Comment #3 from Josef Moravec <josef.moravec@gmail.com> --- Comment on attachment 77589 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77589 Bug 21184: Replace C4::Items::GetBarcodeFromItemnumber calls Review of attachment 77589: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=21184&attachment=77589) ----------------------------------------------------------------- ::: C4/SIP/ILS/Patron.pm @@ +316,5 @@
my $self = shift; my $item_arr = $self->x_items('hold_items', @_); foreach my $item (@{$item_arr}) { + my $item = Koha::Items->find($item->{itemnumber}); + $item->{barcode} = $item ? $item->barcode : undef;
I think there is too many variables called $item ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77589|0 |1 is obsolete| | Attachment #77590|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77955 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77955&action=edit Bug 21184: Replace C4::Items::GetBarcodeFromItemnumber calls Those calls to C4::Items::GetBarcodeFromItemnumber can be replaced with my $barcode = Koha::Items->find($itemnumber)->barcode; But if we are not sure that the item exists, we should test the return of ->find before ->barcode Test plan: - Edit an item - Check an item in - Test SIP - I do not really know how to trigger that code, apparently misc/sip_cli_emulator.pl does not deal with holds. Any ideas? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 77956 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77956&action=edit Bug 21184: Remove GetBarcodeFromItemnumber Test plan: git grep GetBarcodeFromItemnumber should not return anything -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Josef Moravec from comment #3)
Comment on attachment 77589 [details] [review] I think there is too many variables called $item ;)
Haha yes, good catch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #7 from Josef Moravec <josef.moravec@gmail.com> --- You could test this using something like this: misc/sip_cli_emulator.pl -a localhost -p 6001 -su <login> -sp <passsword> -l <library_code> --patron <borrowernumber> -s "Y " -m patron_information -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 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=21184 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77955|0 |1 is obsolete| | Attachment #77956|0 |1 is obsolete| | --- Comment #8 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77961&action=edit Bug 21184: Replace C4::Items::GetBarcodeFromItemnumber calls Those calls to C4::Items::GetBarcodeFromItemnumber can be replaced with my $barcode = Koha::Items->find($itemnumber)->barcode; But if we are not sure that the item exists, we should test the return of ->find before ->barcode Test plan: - Edit an item - Check an item in - Test SIP - I do not really know how to trigger that code, apparently misc/sip_cli_emulator.pl does not deal with holds. Any ideas? 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=21184 --- Comment #9 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77962 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77962&action=edit Bug 21184: Remove GetBarcodeFromItemnumber Test plan: git grep GetBarcodeFromItemnumber should not return anything 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=21184 --- Comment #10 from Josef Moravec <josef.moravec@gmail.com> --- Created attachment 77963 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=77963&action=edit Bug 21184: (follow-up) Fix adding barcode to waiting hold item in SIP Test plan: 1) Set up your SIP: https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 2) Run: misc/sip_cli_emulator.pl -a localhost -p 6001 -su <login> -sp <passsword> -l <library_code> --patron <borrowernumber> -s "Y " -m patron_information the -s parameter says what kind of additional information you want to see 3) Check the response: if the requested patron has waiting hold, there is field "AS" with the barcode of waiting item The right response looks like this: 64 00120180817 052434000100000000000000000000AOCPL|AA1|AEKoha Admin|BLY|CC5|AS39999000004410|PCS|PIY|AFGreetings from Koha. | More reading ;) http://multimedia.3m.com/mws/media/355361O/sip2-protocol.pdf 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=21184 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 | Status|Signed Off |BLOCKED CC| |m.de.rooy@rijksmuseum.nl Patch complexity|--- |Small patch --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA: Looking here -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77961|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 78111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78111&action=edit Bug 21184: Replace C4::Items::GetBarcodeFromItemnumber calls Those calls to C4::Items::GetBarcodeFromItemnumber can be replaced with my $barcode = Koha::Items->find($itemnumber)->barcode; But if we are not sure that the item exists, we should test the return of ->find before ->barcode Test plan: - Edit an item - Check an item in - Test SIP - I do not really know how to trigger that code, apparently misc/sip_cli_emulator.pl does not deal with holds. Any ideas? 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=21184 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77962|0 |1 is obsolete| | --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 78112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78112&action=edit Bug 21184: Remove GetBarcodeFromItemnumber Test plan: git grep GetBarcodeFromItemnumber should not return anything 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=21184 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #77963|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 78113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78113&action=edit Bug 21184: (follow-up) Fix adding barcode to waiting hold item in SIP Test plan: 1) Set up your SIP: https://wiki.koha-community.org/wiki/Koha_SIP2_server_setup 2) Run: misc/sip_cli_emulator.pl -a localhost -p 6001 -su <login> -sp <passsword> -l <library_code> --patron <borrowernumber> -s "Y " -m patron_information the -s parameter says what kind of additional information you want to see 3) Check the response: if the requested patron has waiting hold, there is field "AS" with the barcode of waiting item The right response looks like this: 64 00120180817 052434000100000000000000000000AOCPL|AA1|AEKoha Admin|BLY|CC5|AS39999000004410|PCS|PIY|AFGreetings from Koha. | More reading ;) http://multimedia.3m.com/mws/media/355361O/sip2-protocol.pdf 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=21184 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |nick@bywatersolutions.com --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Bug 21184 depends on bug 21183, which changed state. Bug 21183 Summary: C4::Items - Remove GetItemnumberFromBarcode https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21183 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=21184 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |martin.renvoize@ptfs-europe | |.com Resolution|--- |FIXED --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Enhancement, will not be backported to 18.05.x series. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21184 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |21471 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21471 [Bug 21471] Misspelled variable name in _get_outstanding_holds -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org