[Bug 19759] New: TestBuilder generates too many decimals for float

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] New: TestBuilder generates too many decimals for float

bugzilla-daemon
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: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |Needs Signoff

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

--- Comment #1 from Jonathan Druart <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Jonathan Druart <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #69562|0                           |1
        is obsolete|                            |

--- Comment #2 from Jonathan Druart <[hidden email]> ---
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Dominic Pichette <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #69566|0                           |1
        is obsolete|                            |

--- Comment #3 from Dominic Pichette <[hidden email]> ---
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 <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Dominic Pichette <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off
                 CC|                            |[hidden email]
                   |                            |m

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Jonathan Druart <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Marcel de Rooy <[hidden email]> 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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #69666|0                           |1
        is obsolete|                            |

--- Comment #4 from Marcel de Rooy <[hidden email]> ---
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 <[hidden email]>

Signed-off-by: Marcel de Rooy <[hidden email]>
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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Marcel de Rooy <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         QA Contact|[hidden email]-communit |[hidden email]
                   |y.org                       |
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

--- Comment #5 from Marcel de Rooy <[hidden email]> ---
(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.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Mason James <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master

--- Comment #6 from Jonathan Druart <[hidden email]> ---
Pushed to master for 18.05, thanks to everybody involved!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

--- Comment #7 from Jonathan Druart <[hidden email]> ---
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 <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

--- Comment #8 from Jonathan Druart <[hidden email]> ---
Last patch pushed to master.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 19759] TestBuilder generates too many decimals for float

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19759

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Pushed to Master            |Pushed to Stable
                 CC|                            |[hidden email]

--- Comment #9 from Nick Clemens <[hidden email]> ---
Awesome work all! Pushed to stable for 17.11.01

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/