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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0010238
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionarymajorhave not tried2009-08-11 15:122009-08-20 00:00
ReporterAinhoaPagolaView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Versionpi
StatusclosedFix in branchFixed in SCM revisionb7c077bd1a18
ProjectionnoneETAnoneTarget Version
OSLinux 32 bitDatabaseAnyJava version1.5
OS VersionUbuntu 8.4Database versionAnt version1.7
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0010238: When a modules reference data is inserted, default value is set although NULL value is specified

DescriptionWhen I insert the reference data of a module in the system, although I specified NULL value to be inserted, the default value has been inserted.


Steps To ReproduceExample (can be seen in in HCM module)

- Create a process request and set daily options field to NULL. This field has a default value set to N in Application Dictionary. (Notice that in the database there is no default value)

- Create a dataset, with ad_process_request table, and set where field to id='the_process_request_id';

- Export the dataset

- The dataset has this line:
<dailyOption xsi:nil="true"/>

Still, when the module is installed and the reference data is installed, the inserted process request line has the column 'daily_option' set to N instead of NULL. 'N' is the default value set in the Application Dictionary.
Proposed SolutionIf an optional column is set to NULL, NULL value should be inserted and not the default value.
TagsNo tags attached.
Attached Files? file icon org.openbravo.hcm.common-0.1.0.obx [^] (232,271 bytes) 2009-08-11 15:12

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0018917)
mtaal (manager)
2009-08-11 23:09

A bug indeed. This can probably be solved by changing this line in the XMLEntityConverter:
if ((currentValue == null && newValue != null)
     || (currentValue != null && newValue != null && !currentValue.equals(newValue))) {

(line 221)
to something like this:
if ((currentValue == null && newValue != null)
     || (currentValue != null && newValue == null)
     || (currentValue != null && newValue != null && !currentValue.equals(newValue))) {

Can you try that?

gr. Martin
(0018922)
AinhoaPagola (reporter)
2009-08-12 09:11

I tested this solution and solves the bug. Thanks a lot.
(0018935)
hgbot (developer)
2009-08-13 16:11

Repository: erp/devel/pi
Changeset: b7c077bd1a18a4bbc1324d5ca680c69252198e93
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Aug 13 16:11:01 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b7c077bd1a18a4bbc1324d5ca680c69252198e93 [^]

Fixed issue 10238. Now values will be correctly updated to NULL if they need to be.

---
M src/org/openbravo/dal/xml/XMLEntityConverter.java
---
(0019053)
sureshbabu (reporter)
2009-08-19 12:07

Tested by installing the HCM obx file, Daily_option field rightly inserted with null.

- Issue History
Date Modified Username Field Change
2009-08-11 15:12 AinhoaPagola New Issue
2009-08-11 15:12 AinhoaPagola Assigned To => rafaroda
2009-08-11 15:12 AinhoaPagola File Added: org.openbravo.hcm.common-0.1.0.obx
2009-08-11 15:12 AinhoaPagola Assigned To rafaroda => mtaal
2009-08-11 23:09 mtaal Note Added: 0018917
2009-08-12 09:11 AinhoaPagola Note Added: 0018922
2009-08-13 16:11 hgbot Checkin
2009-08-13 16:11 hgbot Note Added: 0018935
2009-08-13 16:11 hgbot Status new => resolved
2009-08-13 16:11 hgbot Resolution open => fixed
2009-08-13 16:11 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b7c077bd1a18a4bbc1324d5ca680c69252198e93 [^]
2009-08-19 12:07 sureshbabu Status resolved => closed
2009-08-19 12:07 sureshbabu Note Added: 0019053
2009-08-19 12:07 sureshbabu Fixed in Version => pi
2009-08-20 00:00 anonymous sf_bug_id 0 => 2840625


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker