Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020397Openbravo ERPA. Platformpublic2012-05-03 03:252012-05-10 18:20
dbaz 
dbaz 
immediatecriticalalways
closedfixed 
5
 
3.0MP12 
Core
No
0020397: API broken at test 2967
http://builds.openbravo.com/job/int-api/2967/ [^]

The change is needed to upgrade to Smartclient 8.3d in order to let some particular grids run properly

---------------------------------

Needed changes in code:

Javascript handling the json: replace the "." by OB.Constants.FIELDSEPARATOR
example:
  name. + OB.Constants.IDENTIFIER;
turns into
  name + OB.Constants.FIELDSEPARATOR + OB.Constants.IDENTIFIER;

Java returning the json: replace the "." by DalUtil.FIELDSEPARATOR (import org.openbravo.dal.core.DalUtil)
example:
  key + "." + + JsonConstants.IDENTIFIER
turns into
  key + DalUtil.FIELDSEPARATOR + JsonConstants.IDENTIFIER

---------------------------------

Here is the discussion with Isomorphic about why change is needed:
http://forums.smartclient.com/showthread.php?p=84881#post84881 [^]

This particular API break, is due that from now on we use "$" instead of ".". This new separator is also set in the new FIELDSEPARATOR variables, so if you use them, the separator used at the end is transparent for the developer
.
No tags attached.
related to design defect 0020297 closed dbaz [SC Upgrade] name and searchkey empty in product selector popup 
Issue History
2012-05-03 03:25dbazNew Issue
2012-05-03 03:25dbazAssigned To => dbaz
2012-05-03 03:25dbazModules => Core
2012-05-03 03:25dbazRelationship addedrelated to 0020297
2012-05-03 03:32dbazDescription Updatedbug_revision_view_page.php?rev_id=3426#r3426
2012-05-03 03:32dbazAssigned Todbaz => iciordia
2012-05-03 12:54iciordiaNote Added: 0048320
2012-05-03 13:01iperdomoNote Added: 0048321
2012-05-03 13:14iperdomoNote Added: 0048325
2012-05-09 21:24shuehnerNote Added: 0048528
2012-05-09 21:24shuehnerStatusnew => scheduled
2012-05-09 21:24shuehnerAssigned Toiciordia => dbaz
2012-05-09 21:24shuehnerfix_in_branch => pi
2012-05-09 21:27hgbotCheckin
2012-05-09 21:27hgbotNote Added: 0048529
2012-05-09 21:27hgbotStatusscheduled => resolved
2012-05-09 21:27hgbotResolutionopen => fixed
2012-05-09 21:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/api-checks/rev/612a3d1f860735d066f51cc957f5962f00543bb7 [^]
2012-05-10 18:20dbazStatusresolved => closed
2012-05-10 18:20dbazFixed in Version => 3.0MP12

Notes
(0048320)
iciordia   
2012-05-03 12:54   
Please let's do a in detail risk analysis before moving forward.

Thanks,

Ismael
(0048321)
iperdomo   
2012-05-03 13:01   
This change breaks Web POS. Check all occurrences of "._identifier".

$ ack '\._identifier' modules --js

modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_widgets.js
203: ident = grid.getSelectedRecord()._identifier;

modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/test/ob_grid_widgets.js
207: ident = grid.getSelectedRecord()._identifier;

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/order.js
232: productidentifier: p.get('product')._identifier,

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/editline.js
139: me.editlinename.text(data.product._identifier);

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/searchbps.js
45: filter._identifier = '%i' + OB.UTIL.escapeRegExp(me.bpname.val());

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/terminal.js
27: name = this.terminal.get('terminal')._identifier;
28: clientname = this.terminal.get('terminal')['client._identifier'];
29: orgname = this.terminal.get('terminal')['organization._identifier'];
32: pricelistname = this.terminal.get('pricelist')._identifier;
33: currencyname = this.terminal.get('pricelist')['currency._identifier'];
36: locationname = this.terminal.get('location')._identifier;

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/listproducts.js
45: model.get('product')._identifier
66: this.titleProd.text(category.get('category')._identifier);

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/searchproducts.js
56: model.get('category')._identifier
74: filter.product._identifier = '%i' + OB.UTIL.escapeRegExp(me.productname.val());
106: model.get('product')._identifier

modules/org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/components/listcategories.js
45: model.get('category')._identifier
(0048325)
iperdomo   
2012-05-03 13:14   
In the case of Web POS, we just need to change 3 lines, but is a potentially *major* API change in modules using the old notation.
(0048528)
shuehner   
2012-05-09 21:24   
Accepted offline by ICI after doing risk analysis.
Only a few modules are affected and module owners will be contacted to help them adapt to the change.
(0048529)
hgbot   
2012-05-09 21:27   
Repository: erp/devel/api-checks
Changeset: 612a3d1f860735d066f51cc957f5962f00543bb7
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed May 09 21:26:58 2012 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/612a3d1f860735d066f51cc957f5962f00543bb7 [^]

Fixed issue 20397: API Change. Modified DalUtil.FIELDSEPARATOR constant

---
M java/reference/java.japi.gz
---