Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020352Openbravo ERPB. User interfacepublic2012-04-25 17:482013-09-17 19:03
egoitz 
marvintm 
immediatemajoralways
closedfixed 
5
3.0MP10.1 
3.0MP113.0MP11 
Core
No
0020352: A selector doesn't work when writing on the field if exist a field with a displaylogic referencing to the field of the selector
If one of the fiels of a windows has a displaylogic depending on a field with selector reference, the selector does not work properly when writing on the field to find the element.
-Define a tempalte as indevelopment
-Go as system administrator to windows, tabs and field window.
-find sales order window, header tab and go to a field, for example datepromissed
-Add a displaylogic depending on @C_BPartner_ID@
-Save and logout
-Login as Admin
-Go to sales order window
-write on the partner selector
*the value inserted is deleted automacitally
Regression
related to defect 00197243.0MP9 closed mtaal See database id when stepping through records of different orgs 
related to defect 00247263.0MP28 closed shankarb Problems with Selectors if you migrate from Openbravo 2.22 
Issue History
2012-04-25 17:48egoitzNew Issue
2012-04-25 17:48egoitzAssigned To => dbaz
2012-04-25 17:48egoitzModules => Core
2012-04-25 17:48egoitzResolution time => 1335736800
2012-04-25 17:48egoitzTag Attached: Regression
2012-04-25 17:49egoitzversion3.0MP9 => 3.0MP10.1
2012-04-25 17:49egoitzTarget Version => 3.0MP11
2012-04-25 17:51dbazAssigned Todbaz => marvintm
2012-04-25 18:23egoitzNote Added: 0047974
2012-04-25 18:25egoitzIssue Monitored: networkb
2012-04-26 09:35shuehnerIssue Monitored: shuehner
2012-04-26 16:51marvintmNote Added: 0048047
2012-04-26 17:10marvintmRelationship addedrelated to 0019724
2012-04-26 17:30hgbotCheckin
2012-04-26 17:30hgbotNote Added: 0048057
2012-04-26 17:30hgbotStatusnew => resolved
2012-04-26 17:30hgbotResolutionopen => fixed
2012-04-26 17:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/37ae4fda88808dc1f7f14d533cda143e256abf63 [^]
2012-04-26 18:40hgbotCheckin
2012-04-26 18:40hgbotNote Added: 0048064
2012-04-26 18:40hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/37ae4fda88808dc1f7f14d533cda143e256abf63 [^] => http://code.openbravo.com/erp/devel/pi/rev/0a1670b979e2c0d42e97e8c8b045b4a760df9a28 [^]
2012-04-26 18:41marvintmNote Added: 0048065
2012-04-27 10:05egoitzNote Added: 0048129
2012-04-27 10:05egoitzStatusresolved => closed
2012-04-27 10:05egoitzFixed in Version => 3.0MP11
2012-04-27 11:03AugustoMauchNote Added: 0048134
2012-04-28 02:31hudsonbotCheckin
2012-04-28 02:31hudsonbotNote Added: 0048164
2013-09-11 10:35alostaleRelationship addedrelated to 0024726
2013-09-11 20:22hgbotCheckin
2013-09-11 20:22hgbotNote Added: 0061086
2013-09-17 19:03hudsonbotCheckin
2013-09-17 19:03hudsonbotNote Added: 0061239

Notes
(0047974)
egoitz   
2012-04-25 18:23   
on mp7 it works.
on mp9 or higher doesn't
(0048047)
marvintm   
2012-04-26 16:51   
This regression was caused by the following changeset:

https://code.openbravo.com/erp/devel/pi/rev/bcbda0ffe5d873d2dbf98a96e8dfb67bc7a50965 [^]

Specifically, the part related to the ob-selector-item causes the problem: the presence of the business partner selector in the display logic generates a redraw, which in turn causes a call to the mapValueToDisplay method, which in its current form will delete the existing id, as it doesn't yet correspond to a valid business partner.

The change done to the ob-selector-item in the mentioned changeset will be reversed, as it is actually not needed to fix issue 19724.
(0048057)
hgbot   
2012-04-26 17:30   
Repository: erp/devel/pi
Changeset: 37ae4fda88808dc1f7f14d533cda143e256abf63
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Apr 26 17:29:26 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/37ae4fda88808dc1f7f14d533cda143e256abf63 [^]

Fixed issue 20352. Do not remove an invalid value from the selector.
Reverted change done in changeset bcbda0ffe5d8. This change was causing the following behaviour to happen:
- When a field is used as part of a displaylogic of a different field, a redraw of the window will be done in case the selector value happens.
- This redraw will cause a call to the mapValueToDisplay method.
- If the user is typing the name of the business partner, the value will not be one of the valid business partner names (yet).
- With the previous version of the method, the value was then discarded. This produced the very annoying effect of reverting what the user had typed just after he had done it, if he hadn't been 'fast enough' to type the whole identifier of the business partner.
With the change done, the selector will not be cleared if a user types a (not yet completely correct) value in the selector, even if there is a valueMap which doesn't contain what the user has typed.
The issue which was supposedly fixed with this part of the mentioned changeset (issue 19724) still works fine as far as I can tell, even after having removed this part of the change.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0048064)
hgbot   
2012-04-26 18:40   
Repository: erp/devel/pi
Changeset: 0a1670b979e2c0d42e97e8c8b045b4a760df9a28
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu Apr 26 18:37:11 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/0a1670b979e2c0d42e97e8c8b045b4a760df9a28 [^]

Fixed issue 20352. Fixed also in case of combos. Provided a better solution which doesn't cancel previous fix.
- After the previous fix, we've realized that the same problem happened in the case of combos.
- Also, the previous fix reverted the fix of issue 19724, which could still be reproduceable in very specific circumstances.
Due to this, a new fix has been done. Instead of never removing the value if it didn't comply with any of the values in the map, we remove it if and only if the value is a UUID. This way, we avoid the problem in issue 19724 while still fixing the problem which happens when the user types a value.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-list.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0048065)
marvintm   
2012-04-26 18:41   
The initial fix only worked for selectors, but the problem also happens in combos.

I've committed a second fix, which fixes the problem also for combos, and which fixes it in a different way, so that issue 19724 doesn't happen again.

The second fix basically consists on removing the value if it doesn't fit any of the values in the map, but only if this value is UUID, and preserving it otherwise.
(0048129)
egoitz   
2012-04-27 10:05   
verified
(0048134)
AugustoMauch   
2012-04-27 11:03   
Code reviewed and verified in pi@1a9ed7b323c5
(0048164)
hudsonbot   
2012-04-28 02:31   
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/cd923b317af4 [^]

Maturity status: Test
(0061086)
hgbot   
2013-09-11 20:22   
Repository: erp/devel/pi
Changeset: dd0f6674c85196f95c3ddfe97a527b764fd6df99
Author: Shankar Balachandran <shankar.balachandran <at> openbravo.com>
Date: Wed Sep 11 23:50:28 2013 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/dd0f6674c85196f95c3ddfe97a527b764fd6df99 [^]

Fixes Issue 0024726: Problems with Selectors if you migrate from Openbravo 2.22

In the fix for the issue 20352 [1], the condition to replace the numbers only if its a 32 characters UUID was introduced.
But there are ID's in the system that is upto 10 characters, but all numbers. So it does not replace the numbers for these cases,
so instead of the text, the ID's were shown. Now added condition to check the following:
1. uuid's length should be less than 10 or equal to 32.
2. If uuid's length is less than 10, it should contain only numeric values

[1] https://code.openbravo.com/erp/devel/pi/rev/0a1670b979e2c0d42e97e8c8b045b4a760df9a28 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
---
(0061239)
hudsonbot   
2013-09-17 19:03   
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/1c53d622fc50 [^]

Maturity status: Test