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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0023778
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] A. Platformminoralways2013-05-09 12:532013-05-23 01:32
ReporterdbazView Statuspublic 
Assigned Todbaz 
PriorityhighResolutionfixedFixed in Version3.0MP23
StatusclosedFix in branchFixed in SCM revision713f4b92501d
ProjectionnoneETAnoneTarget Version3.0MP23
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0023778: A way to manipulate the returned records (before they be returned) of a standard DataSource is needed

DescriptionA 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.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0058517)
dbaz (developer)
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 (developer)
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
---
(0058519)
AugustoMauch (manager)
2013-05-09 13:16

Code reviewed and verified in pi@713f4b92501d
(0058785)
hudsonbot (developer)
2013-05-23 01:32

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/97c7f6256af7 [^]

Maturity status: Test

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker