Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019694Openbravo ERPA. Platformpublic2012-02-08 18:392012-04-02 15:30
xabiermerino 
AugustoMauch 
highminoralways
closedfixed 
5
3.0MP7.1 
3.0MP103.0MP9 
Core
No
0019694: Wrong behaviour when introduce a date in grid
Wrong behaviour when introduce a date in grid (see video attached)
See vide attached
Regression
related to defect 00190173.0MP5 closed mtaal Wrong toolbar buttons are displayed and having unsaved changed to a previously saved record. 
has duplicate defect 0019988 closed AugustoMauch Date autocompletion fires too early and makes it impossible to edit dates 
? test-0000.mpeg (254,220) 2012-02-08 18:39
https://issues.openbravo.com/file_download.php?file_id=4967&type=bug
Issue History
2012-02-08 18:39xabiermerinoNew Issue
2012-02-08 18:39xabiermerinoAssigned To => alostale
2012-02-08 18:39xabiermerinoFile Added: test-0000.mpeg
2012-02-08 18:39xabiermerinoModules => Core
2012-02-08 18:39xabiermerinoResolution time => 1335304800
2012-03-06 09:01alostaleStatusnew => scheduled
2012-03-06 09:01alostaleAssigned Toalostale => AugustoMauch
2012-03-06 09:01alostalefix_in_branch => pi
2012-03-08 13:24hgbotCheckin
2012-03-08 13:24hgbotNote Added: 0046198
2012-03-08 13:24hgbotStatusscheduled => resolved
2012-03-08 13:24hgbotResolutionopen => fixed
2012-03-08 13:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c4d5958c439723d023fccee50f1f3fbe32077ef6 [^]
2012-03-09 08:27alostaleRelationship addedrelated to 0019988
2012-03-12 13:37hgbotCheckin
2012-03-12 13:37hgbotNote Added: 0046263
2012-03-13 10:10hgbotCheckin
2012-03-13 10:10hgbotNote Added: 0046313
2012-03-13 10:19AugustoMauchNote Added: 0046315
2012-03-13 10:52marvintmNote Added: 0046317
2012-03-13 10:52marvintmStatusresolved => closed
2012-03-13 10:56AugustoMauchRelationship replacedhas duplicate 0019988
2012-03-27 15:51AugustoMauchTag Attached: Regression
2012-04-01 20:31hgbotCheckin
2012-04-01 20:31hgbotNote Added: 0047000
2012-04-01 20:31hgbotStatusclosed => resolved
2012-04-01 20:31hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/c4d5958c439723d023fccee50f1f3fbe32077ef6 [^] => http://code.openbravo.com/erp/devel/pi/rev/b3d59ac71557e01fb2d1536eff084921fdacaf6b [^]
2012-04-01 20:31hgbotCheckin
2012-04-01 20:31hgbotNote Added: 0047001
2012-04-01 20:31hgbotCheckin
2012-04-01 20:31hgbotNote Added: 0047002
2012-04-01 20:38hudsonbotCheckin
2012-04-01 20:38hudsonbotNote Added: 0047072
2012-04-02 06:09hudsonbotCheckin
2012-04-02 06:09hudsonbotNote Added: 0047091
2012-04-02 06:09hudsonbotCheckin
2012-04-02 06:09hudsonbotNote Added: 0047112
2012-04-02 10:25AugustoMauchStatusresolved => closed
2012-04-02 10:25AugustoMauchFixed in Version => 3.0MP9
2012-04-02 15:29AugustoMauchNote Added: 0047315
2012-04-02 15:29AugustoMauchStatusclosed => new
2012-04-02 15:29AugustoMauchResolutionfixed => open
2012-04-02 15:29AugustoMauchFixed in Version3.0MP9 =>
2012-04-02 15:29AugustoMauchRelationship addedrelated to 0019017
2012-04-02 15:30AugustoMauchStatusnew => scheduled
2012-04-02 15:30AugustoMauchStatusscheduled => resolved
2012-04-02 15:30AugustoMauchFixed in Version => 3.0MP9
2012-04-02 15:30AugustoMauchResolutionopen => fixed
2012-04-02 15:30AugustoMauchNote Added: 0047316
2012-04-02 15:30AugustoMauchStatusresolved => closed

Notes
(0046198)
hgbot   
2012-03-08 13:24   
Repository: erp/devel/pi
Changeset: c4d5958c439723d023fccee50f1f3fbe32077ef6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 08 13:22:38 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c4d5958c439723d023fccee50f1f3fbe32077ef6 [^]

Fixes issue 19694: Wrong behaviour when introducing a date in grid

The function update value of ob-formitem-date.js was only meant to be called in the cellEditEnd in the grid view or when the item loses focus in the form view. The behaviour was wrong because the updateValue function was also being called while the field was being edited. A flag (_preventDateParsing) has been added to the grid to ensure that the updateValue function is only called when needed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0046263)
hgbot   
2012-03-12 13:37   
Repository: erp/devel/pi
Changeset: 5cb4c414dc8075ba4f018068b99f298286ef492c
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Mar 12 13:33:49 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5cb4c414dc8075ba4f018068b99f298286ef492c [^]

Related to issue 19694: Date value is now always updated after losing focus

After applying the previous fix (changeset 15739), if the date field had a callback, its value was not being updated correctly if it had the focus and the tab key was pressed. In the previous fix, if the _preventDateParsing tag was true, the date was neither parsed nor updated. Now if the flag is active the date is not parsed, but the value is updated anyway.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
---
(0046313)
hgbot   
2012-03-13 10:10   
Repository: erp/devel/pi
Changeset: 250e1f8a4a94def3d2739dedb8d33e3455da634b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 10:08:31 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/250e1f8a4a94def3d2739dedb8d33e3455da634b [^]

Related to issue 19694: All date grid fields are updated correctly

The previous commit (changeset 15758) fixed the behaviour of the date grid fields that had a callback, but broke the date grid fields that did not. Now the way to update a date field is the following:
- If parsing is prevent (while the field is being entered, for example) do not update the field either. If the parsing is not done but the field is updated anyway, the field gets to store invalid values. The update will only be done after the value has been parsed.
- After parsing and updating, force the new value to be updated in grid.getEnteredValues(). This had to be explicitly done because otherwise the field is not yet updated in that structure when making the FIC call, causing the previous value to be re-entered.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
---
(0046315)
AugustoMauch   
2012-03-13 10:19   
Test plan:
  Do the following tests both in grid and in form view. Do it in dates that have a callout (Invoice Date in the Sales Invoice window) and in dates that do not have a callout (Order Date in the Sales Order window).
  - Create a new record. Change the date before entering the remaining mandatory field (business partner). Whether you exit the date field by pressing the tab button or by clicking on another field, the date field should be autocompleted (if you enter 010205 it should change to 01-02-2005).
  - Save the field. Modify it using the date picker. The date field should be updated. Revert the changes. The previous value should be shown.
(0046317)
marvintm   
2012-03-13 10:52   
Tested that the date field works in case the field triggers a FIC call, and also in case it doesn't. Tested in form and grid view. Also, tested the date picker.
(0047000)
hgbot   
2012-04-01 20:31   
Repository: erp/devel/pi
Changeset: b3d59ac71557e01fb2d1536eff084921fdacaf6b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 08 13:22:38 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b3d59ac71557e01fb2d1536eff084921fdacaf6b [^]

Fixes issue 19694: Wrong behaviour when introducing a date in grid

The function update value of ob-formitem-date.js was only meant to be called in the cellEditEnd in the grid view or when the item loses focus in the form view. The behaviour was wrong because the updateValue function was also being called while the field was being edited. A flag (_preventDateParsing) has been added to the grid to ensure that the updateValue function is only called when needed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0047001)
hgbot   
2012-04-01 20:31   
Repository: erp/devel/pi
Changeset: 91b919ad8410e78b62a650055797fdccb4cf71c9
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Mar 12 13:33:49 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/91b919ad8410e78b62a650055797fdccb4cf71c9 [^]

Related to issue 19694: Date value is now always updated after losing focus

After applying the previous fix (changeset 15739), if the date field had a callback, its value was not being updated correctly if it had the focus and the tab key was pressed. In the previous fix, if the _preventDateParsing tag was true, the date was neither parsed nor updated. Now if the flag is active the date is not parsed, but the value is updated anyway.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
---
(0047002)
hgbot   
2012-04-01 20:31   
Repository: erp/devel/pi
Changeset: 25845513c3897339e118abbddeb216b14b61cc38
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Mar 13 10:08:31 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/25845513c3897339e118abbddeb216b14b61cc38 [^]

Related to issue 19694: All date grid fields are updated correctly

The previous commit (changeset 15758) fixed the behaviour of the date grid fields that had a callback, but broke the date grid fields that did not. Now the way to update a date field is the following:
- If parsing is prevent (while the field is being entered, for example) do not update the field either. If the parsing is not done but the field is updated anyway, the field gets to store invalid values. The update will only be done after the value has been parsed.
- After parsing and updating, force the new value to be updated in grid.getEnteredValues(). This had to be explicitly done because otherwise the field is not yet updated in that structure when making the FIC call, causing the previous value to be re-entered.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-date.js
---
(0047072)
hudsonbot   
2012-04-01 20:38   
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/640de9acc2d5 [^]

Maturity status: Test
(0047091)
hudsonbot   
2012-04-02 06:09   
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/7814864461ac [^]

Maturity status: Test
(0047112)
hudsonbot   
2012-04-02 06:09   
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/7814864461ac [^]

Maturity status: Test
(0047315)
AugustoMauch   
2012-04-02 15:29   
Reopened to add relationship
(0047316)
AugustoMauch   
2012-04-02 15:30   
This regression was caused by the changeset that fixed issue 19017.