[Bug 19759] New: TestBuilder generates too many decimals for float
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Bug ID: 19759 Summary: TestBuilder generates too many decimals for float Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated. It leads to issues when we compare expected objects: # got: '135623.866142537' # expected: '135623.87' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 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=19759 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69562 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69562&action=edit Bug 19759: Make TestBuilder generates only 2 decimals for float For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated. It leads to issues when we compare expected objects: # got: '135623.866142537' # expected: '135623.87' Test plan: prove t/db_dependent/TestBuilder.t must return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |19287 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19287 [Bug 19287] Add ability to mark an item 'Lost' from 'Holds awaiting pickup' list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69562|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69566 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69566&action=edit Bug 19759: Make TestBuilder generates only 2 decimals for float For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated. It leads to issues when we compare expected objects: # got: '135623.866142537' # expected: '135623.87' Test plan: prove t/db_dependent/TestBuilder.t must return green -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Dominic Pichette <dominic.pichette@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69566|0 |1 is obsolete| | --- Comment #3 from Dominic Pichette <dominic.pichette@inlibro.com> --- Created attachment 69666 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69666&action=edit Bug 19759: Make TestBuilder generates only 2 decimals for float For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated. It leads to issues when we compare expected objects: # got: '135623.866142537' # expected: '135623.87' Test plan: prove t/db_dependent/TestBuilder.t must return green Signed-off-by: Dominic Pichette <dominic@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Dominic Pichette <dominic.pichette@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |dominic.pichette@inlibro.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|19287 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19287 [Bug 19287] Add ability to mark an item 'Lost' from 'Holds awaiting pickup' list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=19759 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #69666|0 |1 is obsolete| | --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 69821 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69821&action=edit Bug 19759: Make TestBuilder generates only 2 decimals for float For instance items.replacementprice is decimal(8,2) but more than 2 decimals are generated. It leads to issues when we compare expected objects: # got: '135623.866142537' # expected: '135623.87' Test plan: prove t/db_dependent/TestBuilder.t must return green Signed-off-by: Dominic Pichette <dominic@inlibro.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Somehow I have the feeling that we should allow more decimals sometimes and perhaps have a number of decimals parameter or so. Think of fields like currency or discount. But the current issues justify this change. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 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 | CC| |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=19759 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #4)
like currency or discount.
currency rate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 18.05, 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=19759 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 69861 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69861&action=edit Bug 19759: Fix failing test in Chargelostitem.t t/db_dependent/Circulation/Chargelostitem.t .. 1/6 # Failed test 'The accountline amount should be precessfee value ' # at t/db_dependent/Circulation/Chargelostitem.t line 71. # got: '4.5968041848873e+20' # expected: '459680418488730451968.00' Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759 --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Last patch 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=19759 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |nick@bywatersolutions.com --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to stable for 17.11.01 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org