[Bug 26081] New: 0 items in an order cannot be received do to invalid date handling
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 Bug ID: 26081 Summary: 0 items in an order cannot be received do to invalid date handling Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org When I try to receive 0 items ("Quantity received: 0") for a order in the page /cgi-bin/koha/acqui/orderreceive.pl?ordernumber=1&invoiceid=1 I get the following error when clicking save: Invalid value passed, dateaccessioned=07/30/2020 expected type is date at /usr/share/perl5/Exception/Class/Base.pm line 88 The $datereceived variable is not being processed properly. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think you should not be able to receive 0 - to my knowledge that just didn't save before. The error seems new - are you creating/updating items on receive? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #2 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- You are right Katrin, the issue happens only with the AcqCreateItem set to "Create an item when placing an order." To reproduce this bug be sure to first set this syspref to the aformentioned value and then after that create a new order basket and go receive the item there. (the syspref gets only applied to newly create baskets.) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I think the error has been highlighted by Bug 23463: Replace ModItem with Koha::Item->store -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- What's the expected behaviour? A JS check to make sure the form is only submitted when the quantity > 0? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=21811 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I actually filed a bug for that, because I forgot to fill in quantity received a lot: Bug 21811 - Add warning when order receive form is saved without entering 'quantity received' I think a Javascript check or simply marking the field required (as in has to be greater 1 for saving)? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- *** This bug has been marked as a duplicate of bug 21811 *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Jonathan, if this is duplicate of bug 21811 then it seems like the code that uses $datereceived variable in orderreceive.pl is unused and should be removed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Joonas Kylmälä from comment #7)
Jonathan, if this is duplicate of bug 21811 then it seems like the code that uses $datereceived variable in orderreceive.pl is unused and should be removed.
It's passed to the template: 250 datereceived => $datereceived, -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #9 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Jonathan Druart from comment #8)
(In reply to Joonas Kylmälä from comment #7)
Jonathan, if this is duplicate of bug 21811 then it seems like the code that uses $datereceived variable in orderreceive.pl is unused and should be removed.
It's passed to the template: 250 datereceived => $datereceived,
Sorry, I confused the file to acqui/finishreceive.pl, on line 175 there is a while loop where the variable is used and not necessarily modified to fit the DB format:
while ( my $item = $items->next ) { ...
-- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26081 --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Yes, you are right. I let a comment on bug 21811. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org