Project:
| View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | ||||||||
| 0028561 | ||||||||
| Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
| defect | [Openbravo ERP] A. Platform | minor | have not tried | 2015-01-12 11:06 | 2015-11-23 21:17 | |||
| Reporter | AugustoMauch | View Status | public | |||||
| Assigned To | caristu | |||||||
| Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR16Q1 | |||
| Status | closed | Fix in branch | Fixed in SCM revision | c6c9ab6f8cae | ||||
| Projection | none | ETA | none | Target Version | ||||
| OS | Any | Database | Any | Java version | ||||
| OS Version | Database version | Ant version | ||||||
| Product Version | SCM revision | |||||||
| Merge Request Status | ||||||||
| Review Assigned To | alostale | |||||||
| OBNetwork customer | No | |||||||
| Web browser | ||||||||
| Modules | Core | |||||||
| Support ticket | ||||||||
| Regression level | ||||||||
| Regression date | ||||||||
| Regression introduced in release | ||||||||
| Regression introduced by commit | ||||||||
| Triggers an Emergency Pack | No | |||||||
| Summary | 0028561: OB.Utilities.Number.ScientificToDecimal does not work properly with numbers with leading zeros | |||||||
| Description | Given a number, the returned value of the OB.Utilities.Number.ScientificToDecimal varies if the number has leading zeros. For instance: OB.Utilities.Number.ScientificToDecimal('3.4e-2', '.') => "0.034" (OK) OB.Utilities.Number.ScientificToDecimal('3.4e-02', '.') => "0.034" (OK) OB.Utilities.Number.ScientificToDecimal('03.4e-2', '.') => "0.0034" (Wrong, a different number is returned) OB.Utilities.Number.ScientificToDecimal('3.4e2', '.') => "340" (OK) OB.Utilities.Number.ScientificToDecimal('3.4e02', '.') => "340" (OK) OB.Utilities.Number.ScientificToDecimal('03.4e2', '.') => "0340" (A leading zero is added, it is not as wrong as with a negative exponent, but should also be fixed) | |||||||
| Steps To Reproduce | - Login in Openbravo - Open the developers console. - Enter this expressions and check that if the input number has leading zeroes the result varies. OB.Utilities.Number.ScientificToDecimal('3.4e-2', '.'); OB.Utilities.Number.ScientificToDecimal('03.4e-2', '.'); OB.Utilities.Number.ScientificToDecimal('3.4e2', '.'); OB.Utilities.Number.ScientificToDecimal('03.4e2', '.'); | |||||||
| Tags | No tags attached. | |||||||
| Attached Files | ||||||||
Relationships [ Relation Graph ]
[ Dependency Graph ]
|
|||||||||||||||
|
|||||||||||||||
Notes |
|
|
(0081912) hgbot (developer) 2015-11-17 09:05 |
Repository: erp/devel/pi Changeset: c6c9ab6f8caed480e671a6724dd6145ab8149c8c Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Tue Nov 17 09:04:02 2015 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/c6c9ab6f8caed480e671a6724dd6145ab8149c8c [^] fixes issue 28561: OB.Utilities.Number.ScientificToDecimal and leading zeros OB.Utilities.Number.ScientificToDecimal was not working properly if the number passed as parameter had leading zeros. To fix the problem we use a regular expression to remove them: we look for at least one zero at the beginning of the string representation of the number. If found, it is deleted by replacing it with ''. --- M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/test/ob-utilities-number-test.js M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js --- |
|
(0082056) alostale (viewer) 2015-11-23 08:56 |
code reviewed tested verified new test is executed as part of ci |
|
(0082246) hudsonbot (viewer) 2015-11-23 21:17 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7b56bebaaa88 [^] Maturity status: Test |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2015-01-12 11:06 | AugustoMauch | New Issue | |
| 2015-01-12 11:06 | AugustoMauch | Assigned To | => AugustoMauch |
| 2015-01-12 11:06 | AugustoMauch | OBNetwork customer | => No |
| 2015-01-12 11:06 | AugustoMauch | Modules | => Core |
| 2015-01-12 11:06 | AugustoMauch | Triggers an Emergency Pack | => No |
| 2015-01-12 11:07 | AugustoMauch | Relationship added | related to 0028552 |
| 2015-01-12 11:07 | AugustoMauch | Relationship added | related to 0026132 |
| 2015-03-11 10:08 | alostale | Priority | normal => high |
| 2015-03-11 10:08 | alostale | Status | new => acknowledged |
| 2015-03-17 14:37 | alostale | Assigned To | AugustoMauch => platform |
| 2015-11-11 11:37 | alostale | Priority | high => normal |
| 2015-11-16 10:54 | caristu | Assigned To | platform => caristu |
| 2015-11-16 10:54 | caristu | Status | acknowledged => scheduled |
| 2015-11-17 09:04 | caristu | Review Assigned To | => alostale |
| 2015-11-17 09:04 | caristu | Issue Monitored: alostale | |
| 2015-11-17 09:05 | hgbot | Checkin | |
| 2015-11-17 09:05 | hgbot | Note Added: 0081912 | |
| 2015-11-17 09:05 | hgbot | Status | scheduled => resolved |
| 2015-11-17 09:05 | hgbot | Resolution | open => fixed |
| 2015-11-17 09:05 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/c6c9ab6f8caed480e671a6724dd6145ab8149c8c [^] |
| 2015-11-23 08:56 | alostale | Note Added: 0082056 | |
| 2015-11-23 08:56 | alostale | Status | resolved => closed |
| 2015-11-23 08:56 | alostale | Fixed in Version | => 3.0PR16Q1 |
| 2015-11-23 21:17 | hudsonbot | Checkin | |
| 2015-11-23 21:17 | hudsonbot | Note Added: 0082246 | |
| Copyright © 2000 - 2009 MantisBT Group |