Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019411Openbravo ERPA. Platformpublic2012-01-04 13:152012-01-12 10:26
dbaz 
dbaz 
urgentmajoralways
closedfixed 
5
 
3.0MP8 
Core
No
0019411: Wrong built OB.OnChangeRegistry function
Right now there is a "registry = []" array.
Then there is an assignation like
registry[tabId] = {};

This is wrong because registry is defined as an array and not like an object.
This could cause things like
tabId = '1000500000';
registry[tabId] = {};

Generate a registry.length of 1000500001
You can do it all in the console. Just paste this:

OB.OnChangeRegistry.register('1000500000', 'test', function() { return true; });
console.log(OB.OnChangeRegistry.registry.length);

Notice that the returned length is 1000500001
In ob-change-registry.js change line 25.

registry: [],

by

registry: {},
No tags attached.
Issue History
2012-01-04 13:15dbazNew Issue
2012-01-04 13:15dbazAssigned To => dbaz
2012-01-04 13:15dbazModules => Core
2012-01-04 13:22hgbotCheckin
2012-01-04 13:22hgbotNote Added: 0044116
2012-01-04 13:22hgbotStatusnew => resolved
2012-01-04 13:22hgbotResolutionopen => fixed
2012-01-04 13:22hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/edf472b58e99d5c8ba2835799c1c514aa105d0ef [^]
2012-01-04 21:31mtaalNote Added: 0044125
2012-01-04 21:31mtaalStatusresolved => closed
2012-01-04 21:31mtaalFixed in Version => 3.0MP8
2012-01-12 10:26hudsonbotCheckin
2012-01-12 10:26hudsonbotNote Added: 0044287

Notes
(0044116)
hgbot   
2012-01-04 13:22   
Repository: erp/devel/pi
Changeset: edf472b58e99d5c8ba2835799c1c514aa105d0ef
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Wed Jan 04 13:22:17 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/edf472b58e99d5c8ba2835799c1c514aa105d0ef [^]

Fixed issue 19411: OB.OnChangeRegistry function now is well built

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-onchange-registry.js
---
(0044125)
mtaal   
2012-01-04 21:31   
Reviewed
(0044287)
hudsonbot   
2012-01-12 10: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/e05372cda9e0 [^]

Maturity status: Test