Summary: | Simplify itemnumber handling in returns.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, lucas, martin.renvoize, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26627 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
20.11.00
|
Circulation function: | |
Bug Depends on: | 25969 | ||
Bug Blocks: | 26627 | ||
Attachments: |
Bug 26485: Simplify itemnumber handling in returns.pl
Bug 26485: Simplify itemnumber handling in returns.pl Bug 26485: Simplify itemnumber handling in returns.pl Bug 26485: Simplify itemnumber handling in returns.pl |
Description
Jonathan Druart
2020-09-18 08:59:23 UTC
Created attachment 110321 [details] [review] Bug 26485: Simplify itemnumber handling in returns.pl This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone. It looks saner than the current code :-D Created attachment 110999 [details] [review] Bug 26485: Simplify itemnumber handling in returns.pl This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Playing with items return and transfers is OK with this change. OMG we also need to manage $item object : grep 'Koha::Items->find' circ/returns.pl my $item = Koha::Items->find( $itemnumber ); my $item = Koha::Items->find({ barcode => $barcode }); my $item = Koha::Items->find( $itemnumber ); my $item = Koha::Items->find({ barcode => $bar_code }); my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How many times do we fetch this item?!? (In reply to Fridolin SOMERS from comment #5) > OMG we also need to manage $item object : > > grep 'Koha::Items->find' circ/returns.pl > my $item = Koha::Items->find( $itemnumber ); > my $item = Koha::Items->find({ barcode => $barcode }); > my $item = Koha::Items->find( $itemnumber ); > my $item = Koha::Items->find({ barcode => $bar_code }); > my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How > many times do we fetch this item?!? Yowsers!.. Lets do this.. perhaps in a new bug Created attachment 111028 [details] [review] Bug 26485: Simplify itemnumber handling in returns.pl This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (In reply to Martin Renvoize from comment #6) > (In reply to Fridolin SOMERS from comment #5) > > OMG we also need to manage $item object : > > > > grep 'Koha::Items->find' circ/returns.pl > > my $item = Koha::Items->find( $itemnumber ); > > my $item = Koha::Items->find({ barcode => $barcode }); > > my $item = Koha::Items->find( $itemnumber ); > > my $item = Koha::Items->find({ barcode => $bar_code }); > > my $item_from_barcode = Koha::Items->find({barcode => $barcode }); # How > > many times do we fetch this item?!? > > Yowsers!.. Lets do this.. perhaps in a new bug I think there is one already (without patch), but cannot find it. Created attachment 111029 [details] [review] Bug 26485: Simplify itemnumber handling in returns.pl This is a follow-up for bug 25969. The way we handle itemnumber is too complicated and error prone. Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Sooo much clearer! Passing QA Pushed to master for 20.11, thanks to everybody involved! enhancement will not be backported to 20.05.x |