[Bug 27082] New: Problem when a basket has more of 20 orders with uncertain price
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Bug ID: 27082 Summary: Problem when a basket has more of 20 orders with uncertain price Change sponsored?: --- Product: Koha Version: 20.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: marjorie.barry-vila@collecto.ca QA Contact: testopia@bugs.koha-community.org Hi, There is a problem when a basket has more of 20 orders with uncertain price Test plan: 1- create a basket 2- add more of 20 orders with uncertain price 3- click on uncertain price button 4- on page 1 of list, uncheck uncertain box of an order 5- click on save button 6- orders who were on page 2 are not display anymore in page uncertainprice.pl 7- return to basket view acqui/basket.pl 8- orders who were on page 2 have "rvcd" label and quantity is null Screen capture here https://www.screencast.com/t/00cO5f1RNJdE Tested on 19.05 and 20.05.04 Regards Marjorie -- 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=27082 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23013 Assignee|koha-bugs@lists.koha-commun |jonathan.druart@bugs.koha-c |ity.org |ommunity.org Version|20.05 |master CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|NEW |ASSIGNED Severity|normal |critical --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Coming from commit 247dca306407ac9568344a0a37aca3bbcffc2468 Bug 23013: Upgrade DataTables in the staff client What's happening: When the form is submitted, all the orders with uncertain price are processed, but the posted values only contain the ones from the first page of the table. The orders that are not displayed on the first page will have their prices fields and uncertainprice set to NULL. This is a critical bug and must be fixed ASAP (data loss). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23013 [Bug 23013] Upgrade DataTables in the staff client -- 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=27082 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=27082 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 113940 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113940&action=edit Bug 27082: (bug 23013 follow-up) Remove pagination from uncertain prices When more than 20 orders with uncertain prices are displayed on the "uncertain prices" view, the pagination is displayed and will cause data loss if the form is submitted. The pagination is there since: commit 247dca306407ac9568344a0a37aca3bbcffc2468 Bug 23013: Upgrade DataTables in the staff client What's happening: When the form is submitted, all the orders with uncertain price are processed, but the posted values only contain the ones from the first page of the table. The orders that are not displayed on the first page will have their prices fields and uncertainprice set to NULL. Test plan: 1- create a basket 2- add more of 20 orders with uncertain price 3- click on uncertain price button 4- click on save button => There is no more pagination and the form behaves correctly -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 David Nind <david@davidnind.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=27082 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113940|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 113965 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113965&action=edit Bug 27082: (bug 23013 follow-up) Remove pagination from uncertain prices When more than 20 orders with uncertain prices are displayed on the "uncertain prices" view, the pagination is displayed and will cause data loss if the form is submitted. The pagination is there since: commit 247dca306407ac9568344a0a37aca3bbcffc2468 Bug 23013: Upgrade DataTables in the staff client What's happening: When the form is submitted, all the orders with uncertain price are processed, but the posted values only contain the ones from the first page of the table. The orders that are not displayed on the first page will have their prices fields and uncertainprice set to NULL. Test plan: 1- create a basket 2- add more of 20 orders with uncertain price 3- click on uncertain price button 4- click on save button => There is no more pagination and the form behaves correctly Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com --- Comment #4 from Blou <philippe.blouin@inlibro.com> --- Please note that this bug is not originating in Bug 23013. The issue presented by Marjorie has been fixed and rebased in their code since 17.05. With a different solution, in the .pl. She'd asked me to submit it, but you beat me to the punch. Good job! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Blou from comment #4)
Please note that this bug is not originating in Bug 23013. The issue presented by Marjorie has been fixed and rebased in their code since 17.05.
With a different solution, in the .pl.
She'd asked me to submit it, but you beat me to the punch. Good job!
If the bug existed prior to bug 23013, I am not sure my patch will fix the problem as it just reverts the change from bug 23013. However it seems to work when I tested it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #6 from Blou <philippe.blouin@inlibro.com> --- Here's what Bouzid's fix was doing: --- a/acqui/uncertainprice.pl +++ b/acqui/uncertainprice.pl @@ -88,6 +88,7 @@ if ( $op eq 'validate' ) { for (my $i=0; $i < $count; $i++) { my $order = pop(@orders); my $ordernumber = $order->{ordernumber}; + next unless ($input->param('qty'.$ordernumber)); my $order_as_from_db=GetOrder($order->{ordernumber}); $order->{'listprice'} = $input->param('price'.$ordernumber); But this avoids the "crash" without fixing the issue at root I fear. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Bouzid's fix is better and more robust that mine. I was simply reverting the change made by bug 23013. Could you submit a patch? And also confirm that the bug exists in 17.05 (23013 is in 17.11)? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #8 from Blou <philippe.blouin@inlibro.com> --- Created attachment 113969 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113969&action=edit Bug 27082: uncertainprice.pl does not handle pagination To reproduce: 1- create a basket 2- add more of 20 orders with uncertain price 3- click on uncertain price button 4- on page 1 of list, uncheck uncertain box of an order 5- click on save button 6- orders who were on page 2 are not display anymore in page uncertainprice.pl 7- return to basket view acqui/basket.pl 8- orders who were on page 2 have "rvcd" label and quantity is null The data in page 2 and beyond is not transmitted, but the code doesn't handle that. This patch makes sure that all that (empty) data is not (wrongly) processed. Sponsored by: CCSR -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113965|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Change sponsored?|--- |Sponsored Status|Signed Off |Needs Signoff Patch complexity|--- |Small patch --- Comment #9 from Blou <philippe.blouin@inlibro.com> --- I obsoleted the other patch, presuming that was your intention. I validated our history (the ticket and the old branches) and this problem was first fixed in 16.11 in CCSR's codebase. There's even a comment about pushing it to bugzilla at the time "to be determined". The patch has been following our rebases without much questionning for over 3 years now. I hope it helps. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_20_11_target --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Yes, I confirmed that there was pagination in 17.05. No need to dig more into the problem, let's consider it's almost everywhere... Thanks, Philippe! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Nick Clemens <nick@bywatersolutions.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=27082 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #113969|0 |1 is obsolete| | --- Comment #11 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 113977 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113977&action=edit Bug 27082: uncertainprice.pl does not handle pagination To reproduce: 1- create a basket 2- add more of 20 orders with uncertain price 3- click on uncertain price button 4- on page 1 of list, uncheck uncertain box of an order 5- click on save button 6- orders who were on page 2 are not display anymore in page uncertainprice.pl 7- return to basket view acqui/basket.pl 8- orders who were on page 2 have "rvcd" label and quantity is null The data in page 2 and beyond is not transmitted, but the code doesn't handle that. This patch makes sure that all that (empty) data is not (wrongly) processed. Sponsored by: CCSR Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- Small patch, works, passing QA - we should probably refactor this a bit in the future to only process submitted orders or use the api but this is a bad bug -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com Status|Signed Off |Passed QA QA Contact|tomascohen@gmail.com |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jonathan.druart@bugs.koha-c |philippe.blouin@inlibro.com |ommunity.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |20.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 20.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=27082 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_20_11_target | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|20.11.00 |20.11.00, 20.05.07 released in| | Status|Pushed to master |Pushed to stable CC| |andrew@bywatersolutions.com --- Comment #14 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Pushed to 20.05.x for 20.05.07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27082 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable CC| |victor@tuxayo.net Version(s)|20.11.00, 20.05.07 |20.11.00, 20.05.07, released in| |19.11.13 --- Comment #15 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported to 19.11.x branch for 19.11.13 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org