Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0028187 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2014-11-17 13:35 | 2014-12-30 23:26 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR15Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 92f8c399eacb | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | alostale | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 32447 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0028187: Error after saving a product with characteristics in grid view under some circunstances | |||||||
Description | Is not possible to modify a product with characteristics in grid view if the "Characteristic Description" field is not displayed in grid view. It seems that the system is trying to save a JSON Object instead of a String, according to the error in the log: ERROR org.openbravo.base.validation.ValidationException - Exception org.openbravo.base.validation.ValidationException: at org.openbravo.base.model.domaintype.BasePrimitiveDomainType.checkIsValidValue(BasePrimitiveDomainType.java:58) at org.openbravo.base.model.Property.checkIsValidValue(Property.java:804) at org.openbravo.base.structure.BaseOBObject.set(BaseOBObject.java:272) | |||||||
Steps To Reproduce | 1) Create a new product with one characteristic at least 2) Hide the "Characteristic Description" field of the grid view 3) Edit the product created in step 1), in grid view. For example, uncheck the "Active" checbox. Save the record, the error is thrown. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0072059) hgbot (developer) 2014-11-27 11:40 |
Repository: erp/devel/pi Changeset: 92f8c399eacbe8cfde48797fdf92a878e020f047 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Thu Nov 27 11:18:38 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/92f8c399eacbe8cfde48797fdf92a878e020f047 [^] Fixes issue 28187: Row is saved even with ProductCharacteristics column hidden Product characteristics are somewhat special in the sense that the value returned by the FIC in columnValues is different from the value that is finally stored in the database. If a product has a characteristic 'X' with a value 'Y', the FIC returns this json object: { characteristics: { X:'Y'}, dbValue: 'X : Y' } In the database the stored value should be the dbValue of this json object. This replacement is done in th setValue function of the product characteristics formitem. The problem is that this function is not invoked, and cannot be invoked, if this column is hidden in the grid. When the function is invoked, instead of storing string contained in the dbValue property in the database, the whole json object returned by the FIC is sent to the datasource and a validation exception is thrown. To fix this, the value is going to be fixed in the JsonToDataConverter.convertJsonToPropertyValue method. To be able to discern that the property belong to a Product Characteristics column, the ProductCharacteristicsDomainType class has been created and has been associated with the Product Characteristics reference. This class has a method called fixValue, that detects the case when the provided value is not correct, and fix it. --- M modules/org.openbravo.service.json/src/org/openbravo/service/json/JsonToDataConverter.java M src-db/database/sourcedata/AD_REFERENCE.xml A src/org/openbravo/base/model/domaintype/ProductCharacteristicsDomainType.java --- |
(0072195) alostale (viewer) 2014-12-01 13:51 |
code reviewed Tested showing and hiding the characteristics field and editing in grid and form views. |
(0073150) hudsonbot (viewer) 2014-12-30 23:26 |
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/6525fe229e06 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2014-11-17 13:35 | caristu | New Issue | |
2014-11-17 13:35 | caristu | Assigned To | => AugustoMauch |
2014-11-17 13:35 | caristu | OBNetwork customer | => Yes |
2014-11-17 13:35 | caristu | Modules | => Core |
2014-11-17 13:35 | caristu | Support ticket | => 32447 |
2014-11-17 13:35 | caristu | Resolution time | => 1418943600 |
2014-11-17 13:35 | caristu | Triggers an Emergency Pack | => No |
2014-11-17 16:12 | heccam | Issue Monitored: heccam | |
2014-11-26 08:22 | alostale | Assigned To | AugustoMauch => inigosanchez |
2014-11-27 10:22 | AugustoMauch | Assigned To | inigosanchez => AugustoMauch |
2014-11-27 11:37 | AugustoMauch | Issue Monitored: alostale | |
2014-11-27 11:37 | AugustoMauch | Review Assigned To | => alostale |
2014-11-27 11:40 | hgbot | Checkin | |
2014-11-27 11:40 | hgbot | Note Added: 0072059 | |
2014-11-27 11:40 | hgbot | Status | new => resolved |
2014-11-27 11:40 | hgbot | Resolution | open => fixed |
2014-11-27 11:40 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/92f8c399eacbe8cfde48797fdf92a878e020f047 [^] |
2014-12-01 13:51 | alostale | Note Added: 0072195 | |
2014-12-01 13:51 | alostale | Status | resolved => closed |
2014-12-01 13:51 | alostale | Fixed in Version | => 3.0PR15Q1 |
2014-12-30 23:26 | hudsonbot | Checkin | |
2014-12-30 23:26 | hudsonbot | Note Added: 0073150 |
Copyright © 2000 - 2009 MantisBT Group |