Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0011812
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajorhave not tried2009-12-17 14:032010-01-06 00:00
ReportermtaalView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision1211a3da302e
ProjectionnoneETAnoneTarget Versionpi
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0011812: Implement more lenient handling of decimal numbers which can correctly be converted to a long for a changed reference

DescriptionThe reference for a several columns has changed from a decimal number to an integer (from reference 22 to reference id 11).
See this changeset:
https://code.openbravo.com/erp/devel/pi/rev/9e660d4a5c4a [^]

The XML import should be more lenient in that if it can convert a decimal number to a long without changing the number it should do so. Currently (without this change) the xml import fails with a stack trace like this:
     [java] org.openbravo.dal.xml.EntityXMLException: Value 24.0 can not be parsed to an instance of class java.lang.Long
     [java] at org.openbravo.dal.xml.XMLTypeConverter.fromXML(XMLTypeConverter.java:166)
     [java] at org.openbravo.dal.xml.XMLEntityConverter.processEntityElement(XMLEntityConverter.java:213)
     [java] at org.openbravo.dal.xml.XMLEntityConverter.process(XMLEntityConverter.java:123)
     [java] at org.openbravo.service.db.DataImportService.importDataFromXML(DataImportService.java:409)
     [java] at org.openbravo.service.db.DataImportService.importDataFromXML(DataImportService.java:125)
     [java] at org.openbravo.erpCommon.modules.ApplyModule.execute(ApplyModule.java:162)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleTask.doExecute(ApplyModuleTask.java:58)
     [java] at org.openbravo.dal.core.DalInitializingTask.execute(DalInitializingTask.java:120)
     [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
     [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
     [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java] at java.lang.reflect.Method.invoke(Method.java:616)
     [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java] at org.apache.tools.ant.Task.perform(Task.java:348)
     [java] at org.apache.tools.ant.Target.execute(Target.java:357)
     [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
     [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
     [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
     [java] at org.openbravo.erpCommon.utility.AntExecutor.runTask(AntExecutor.java:225)
     [java] at org.openbravo.erpCommon.modules.ApplyModuleTask.main(ApplyModuleTask.java:44)
Proposed SolutionAllow conversion which does not change the value so:
24.0 --> 24
24.5 --> exception (can not be converted to long without changing the value)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0022917)
hgbot (developer)
2009-12-17 14:22

Repository: erp/devel/pi
Changeset: 1211a3da302e613c60a17b9c28061a83e9ed8afd
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Dec 17 14:22:03 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/1211a3da302e613c60a17b9c28061a83e9ed8afd [^]

fixes issue 11812: Implement more lenient handling of decimal numbers which can correctly be converted to a long for a changed reference

---
M src-test/org/openbravo/test/dal/IssuesTest.java
M src/org/openbravo/dal/xml/XMLTypeConverter.java
---
(0022958)
hudsonbot (developer)
2009-12-19 00:36

---
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/1211a3da302e [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/867059305a34 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15773.obx [^]
---
(0023220)
iperdomo (reporter)
2010-01-05 11:33

Tested on pi @ rev cb3804b67363

- Issue History
Date Modified Username Field Change
2009-12-17 14:03 mtaal New Issue
2009-12-17 14:03 mtaal Assigned To => mtaal
2009-12-17 14:22 hgbot Checkin
2009-12-17 14:22 hgbot Note Added: 0022917
2009-12-17 14:22 hgbot Status new => resolved
2009-12-17 14:22 hgbot Resolution open => fixed
2009-12-17 14:22 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1211a3da302e613c60a17b9c28061a83e9ed8afd [^]
2009-12-19 00:36 hudsonbot Checkin
2009-12-19 00:36 hudsonbot Note Added: 0022958
2010-01-05 11:33 iperdomo Note Added: 0023220
2010-01-05 11:33 iperdomo Status resolved => closed
2010-01-06 00:00 anonymous sf_bug_id 0 => 2926547


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker