Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0014422 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2010-09-03 13:14 | 2010-10-19 00:00 | |||
Reporter | dbaz | View Status | public | |||||
Assigned To | iperdomo | |||||||
Priority | high | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | adbb4479b500 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | Oracle | Java version | 1.6.0_10 | |||
OS Version | Kubuntu 8.10 | Database version | 10g XE | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | ||||||||
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 | 0014422: Strange code in F.getFormat in DynamicJS (related to number formatting) | |||||||
Description | At the end of DynamicJS.js (loaded in the menu) there are the mechanism to translate a maskName (of the ones defined in Format.xml) to its maskFormat The function is var F = {"formats": [ {"name":"generalQtyEdition","output":"#0.######"}, {"name":"qtyEdition","output":"#0.###"}, {"name":"euroEdition","output":"#0.00"}, {"name":"generalQtyRelation","output":"#,##0.######"}, {"name":"priceEdition","output":"#0.00"}, {"name":"priceExcel","output":"#,##0.##"}, {"name":"euroRelation","output":"#,##0.00"}, {"name":"generalQtyExcel","output":"#,##0.######"}, {"name":"qtyExcel","output":"#,##0.###"}, {"name":"amountInform","output":"#,##0.00"}, {"name":"integerRelation","output":"#,##0"}, {"name":"integerExcel","output":"#,##0"}, {"name":"euroInform","output":"#,##0.00"}, {"name":"integerEdition","output":"#0"}, {"name":"priceRelation","output":"#,##0.00"}, {"name":"qtyRelation","output":"#,##0.###"}, {"name":"euroExcel","output":"#,##0.##"}, {"name":"priceInform","output":"#,##0.##"}, {"name":"integerInform","output":"#,##0"} ] }; F.getFormat=function(name) if(typeof name==='undefined'||name==='') { return'qtyEdition'; } for(var i=0;i<this.formats.length;i++){ if(this.formats[i].name===name){ return this.formats[i].output; } } return'qtyEdtion'; } The strange points are the in the validation statements of the F.getFormat function: * The return'qtyEdition'; -> an space is missing (but not crucial). Also it seems to be the wrong return (see third point). * The return'qtyEdtion'; -> an space is missing (but not crucial) but also there is a typo and an "i" is missing. Also it seems to be the wrong return (see third point). * This function pretends to return something like "#0.###" or whatever (depending of the name given as input)... and it seems that when name is not declared or it can not find anything, it is going to return the string "qtyEdition" or "qtyEdtion" respectively which it seems to be wrong... it should be something like: return F.getFormat('qtyEdition'); in both cases | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0031743) hgbot (developer) 2010-10-11 11:03 |
Repository: erp/devel/pi Changeset: adbb4479b500e9f962765b80ac9874e25bcd987a Author: Iván Perdomo <ivan.perdomo <at> openbravo.com> Date: Thu Oct 07 12:06:37 2010 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/adbb4479b500e9f962765b80ac9874e25bcd987a [^] Fixes issue 14422: Fixed getFormat function when returning default values --- M src/org/openbravo/erpCommon/utility/DynamicJS.java --- |
(0031766) hudsonbot (viewer) 2010-10-11 18:48 |
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated: Changeset: http://code.openbravo.com/erp/devel/main/rev/adbb4479b500 [^] Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/0b4e4ae24456 [^] Tests: http://builds.openbravo.com/view/int/ [^] OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.18512.obx [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2010-09-03 13:14 | dbaz | New Issue | |
2010-09-03 13:14 | dbaz | Assigned To | => iperdomo |
2010-09-03 13:14 | dbaz | OBNetwork customer | => No |
2010-09-06 08:10 | alostale | Status | new => scheduled |
2010-10-11 11:03 | hgbot | Checkin | |
2010-10-11 11:03 | hgbot | Note Added: 0031743 | |
2010-10-11 11:03 | hgbot | Status | scheduled => resolved |
2010-10-11 11:03 | hgbot | Resolution | open => fixed |
2010-10-11 11:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/adbb4479b500e9f962765b80ac9874e25bcd987a [^] |
2010-10-11 18:48 | hudsonbot | Checkin | |
2010-10-11 18:48 | hudsonbot | Note Added: 0031766 | |
2010-10-18 17:57 | dbaz | Status | resolved => closed |
2010-10-19 00:00 | anonymous | sf_bug_id | 0 => 3090005 |
Copyright © 2000 - 2009 MantisBT Group |