Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0023778 | Openbravo ERP | A. Platform | public | 2013-05-09 12:53 | 2013-05-23 01:32 |
|
Reporter | dbaz | |
Assigned To | dbaz | |
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | 3.0MP23 | Fixed in Version | 3.0MP23 | |
Merge Request Status | |
Review Assigned To | AugustoMauch |
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 | 0023778: A way to manipulate the returned records (before they be returned) of a standard DataSource is needed |
Description | A new mechanism to manipulate the returned records (before they be returned) of a standard DataSource is needed.
So, if additional manual logic is needed for transform the expected records, there should be a mechanism to handle that, so the returned json will has these modifications. |
Steps To Reproduce | . |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2013-05-09 12:53 | dbaz | New Issue | |
2013-05-09 12:53 | dbaz | Assigned To | => dbaz |
2013-05-09 12:53 | dbaz | Modules | => Core |
2013-05-09 12:53 | dbaz | OBNetwork customer | => No |
2013-05-09 12:53 | dbaz | Triggers an Emergency Pack | => No |
2013-05-09 12:58 | dbaz | Note Added: 0058517 | |
2013-05-09 12:58 | dbaz | Review Assigned To | => AugustoMauch |
2013-05-09 12:58 | dbaz | Issue Monitored: AugustoMauch | |
2013-05-09 13:11 | hgbot | Checkin | |
2013-05-09 13:11 | hgbot | Note Added: 0058518 | |
2013-05-09 13:11 | hgbot | Status | new => resolved |
2013-05-09 13:11 | hgbot | Resolution | open => fixed |
2013-05-09 13:11 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/713f4b92501db647e461fcf87f5e194adf7d1e01 [^] |
2013-05-09 13:16 | AugustoMauch | Note Added: 0058519 | |
2013-05-09 13:16 | AugustoMauch | Status | resolved => closed |
2013-05-09 13:16 | AugustoMauch | Fixed in Version | => 3.0MP23 |
2013-05-23 01:32 | hudsonbot | Checkin | |
2013-05-23 01:32 | hudsonbot | Note Added: 0058785 | |
Notes |
|
(0058517)
|
dbaz
|
2013-05-09 12:58
|
|
100% risk free
There is a new method "bobFetchTransformation" in "DefaultJsonDataService" that can be overwritten to do the custom logic in the BaseOBObjects that are going to be returned later in a json.
This feature has some remarks:
* If the number of the returned bobs change, there could be problems because endRow and totalRows parameters will be out-of-sync with that the requester expects, and some values can be missing in the following fetches. If there is no pagination (all values are returned at once), there is no problem.
* If any bob is modified, the original entity is being modified, so a good practice could be clone the bob (using DalUtil.copy, for example) before modify it, and then return the clone.
The test-case for this issue, is as simple as verify that any standard DataSource still work as before. |
|
|
(0058518)
|
hgbot
|
2013-05-09 13:11
|
|
Repository: erp/devel/pi
Changeset: 713f4b92501db647e461fcf87f5e194adf7d1e01
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Thu May 09 13:10:02 2013 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/713f4b92501db647e461fcf87f5e194adf7d1e01 [^]
Fixed issue 23778: added 'bobFetchTransformation' method to 'DefaultJsonDataService'
---
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
|
|
|
|
Code reviewed and verified in pi@713f4b92501d |
|
|
|
|