Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0010238 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 00. Application dictionary | major | have not tried | 2009-08-11 15:12 | 2009-08-20 00:00 | |||
Reporter | AinhoaPagola | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | pi | |||
Status | closed | Fix in branch | Fixed in SCM revision | b7c077bd1a18 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Linux 32 bit | Database | Any | Java version | 1.5 | |||
OS Version | Ubuntu 8.4 | Database version | Ant version | 1.7 | ||||
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 | 0010238: When a modules reference data is inserted, default value is set although NULL value is specified | |||||||
Description | When 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 Reproduce | Example (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 Solution | If an optional column is set to NULL, NULL value should be inserted and not the default value. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0018917) mtaal (viewer) 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 (viewer) 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 (viewer) 2009-08-19 12:07 |
Tested by installing the HCM obx file, Daily_option field rightly inserted with null. |
![]() |
|||
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 | OBNetwork customer | => No |
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 |