[Bug 23397] New: Order lines can be duplicated in acqui scripts spent.pl and ordered.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Bug ID: 23397 Summary: Order lines can be duplicated in acqui scripts spent.pl and ordered.pl Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types. To recreate: 1 - Place an order for 4 copies of a title in acq 2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket) 3 - Set three items to one type, and one to another 4 - Go to Acqui-Home and click 'ordered' for the used budget 5 - Note the line is duplicated for each itemtype in the order 6 - Recieve the items and note the same issue on 'Spent' 7 - Place another order as before so you have the problem in both ordered.pl and spent/pl -- 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=23397 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- 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=23397 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 91855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=91855&action=edit Bug 23397: Fix grouping of orders in acqui scripts Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types. To recreate: 1 - Place an order for 4 copies of a title in acq 2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket) 3 - Set three items to one type, and one to another 4 - Go to Acqui-Home and click 'ordered' for the used budget 5 - Note the line is duplicated for each itemtype in the order 6 - Recieve the items and note the same issue on 'Spent' 7 - Place another order as before so you have the problem in both ordered.pl and spent/pl 8 - Apply patch 9 - Note orders are no longer duplicated -- 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=23397 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- 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=23397 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=23397 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #91855|0 |1 is obsolete| | --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 92344 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92344&action=edit Bug 23397: Fix grouping of orders in acqui scripts Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types. To recreate: 1 - Place an order for 4 copies of a title in acq 2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket) 3 - Set three items to one type, and one to another 4 - Go to Acqui-Home and click 'ordered' for the used budget 5 - Note the line is duplicated for each itemtype in the order 6 - Recieve the items and note the same issue on 'Spent' 7 - Place another order as before so you have the problem in both ordered.pl and spent/pl 8 - Apply patch 9 - Note orders are no longer duplicated Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Form shows itemtype, which is empty now. Template contains: ItemTypes.GetDescription( order.itype ) If you would add AS itype to the GROUP_CONCAT you added, it still does not work, since the concatenated string is no itype anymore.. Remove it from the form ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 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 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- BTW While testing: DBD::mysql::st execute failed: Incorrect double value: '' for column `koha_master`.`aqorders`.`discount` at row 1 [for Statement "UPDATE aqorders SET basketno=?, biblionumber=?, quantity=?, budget_id=?, currency=?, listprice=?, discount=?, rrp=?, replacementprice=?, ecost=?, unitprice=?, order_internalnote=?, order_vendornote=?, sort1=?, sort2=?, subscriptionid=?, uncertainprice=?, tax_rate_on_ordering=?, rrp_tax_excluded=?, rrp_tax_included=?, ecost_tax_excluded=?, ecost_tax_included=?, tax_value_on_ordering=?, timestamp=NOW() WHERE ordernumber=?" with ParamValues: 0="67", 1="2578", 2="2", 3="123", 4="USD", 5="10", 6="", 7="10.00", 8="10.00", 9="10.00", 10="0.00", 11="", 12="", 13="", 14="", 15=undef, 16="0", 17="0", 18="10.00", 19="10", 20="10", 21="10", 22="0", 23="15"] at /usr/share/koha/C4/Acquisition.pm line 1358. With strict SQL saving the order failed invisibly.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Could we deal with that in the template, splitting up the string and displaying all itemtypes of an order? Worried about this one as it makes the amounts not add up... and libraries don't like that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #5)
Could we deal with that in the template, splitting up the string and displaying all itemtypes of an order?
Worried about this one as it makes the amounts not add up... and libraries don't like that.
We could show the concatenated itypes if GetDescription does not come up with a value? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think if we can't fix showing the description, nothing is better right now and matches the behaviour before as far as I can tell from our installations where we have a mix of empty and itemtype description. What I was thinking was: if I understood GROUP_CONCAT right it gives you a comma separated string of values? Could we not split by , and loop through it template side? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 92446 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92446&action=edit Bug 23397: (follow-up) Split and display itemtypes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #8)
Created attachment 92446 [details] [review] Bug 23397: (follow-up) Split and display itemtypes
Looking at it again -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 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=23397 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92344|0 |1 is obsolete| | --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 92448 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92448&action=edit Bug 23397: Fix grouping of orders in acqui scripts Bug 21622 attempted to fix some grouping for strict mode, however, it failed to take into account that single order can have multiple item types. To recreate: 1 - Place an order for 4 copies of a title in acq 2 - Make sure you are creating orders when ordering (AcqCreateItems syspref and/or when creating basket) 3 - Set three items to one type, and one to another 4 - Go to Acqui-Home and click 'ordered' for the used budget 5 - Note the line is duplicated for each itemtype in the order 6 - Recieve the items and note the same issue on 'Spent' 7 - Place another order as before so you have the problem in both ordered.pl and spent/pl 8 - Apply patch 9 - Note orders are no longer duplicated Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> 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=23397 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #92446|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 92449 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92449&action=edit Bug 23397: (follow-up) Split and display itemtypes 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=23397 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 92450 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=92450&action=edit Bug 23397: (QA follow-up) Replace mod 2 by last Looks better: Maps | Books | Continuing Resources 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=23397 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I was completely stuck with circ/pendingreserves.pl because of the use of GROUP_CONCAT. It makes things super hard to rewrite. Do not we have another option? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I do not have much to suggest apart from rewriting the scripts from scratch, which seems quite out of the scope ;) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |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=23397 --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23397 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable CC| |fridolin.somers@biblibre.co | |m Version(s)|19.11.00 |19.11.00,19.05.04 released in| | --- Comment #16 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 19.05.x for 19.05.04 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org