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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028188
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2014-11-17 13:562014-12-30 23:26
ReportercaristuView Statuspublic 
Assigned ToAugustoMauch 
PriorityurgentResolutionfixedFixed in Version3.0PR15Q1
StatusclosedFix in branchpiFixed in SCM revisiona57ac42b2bec
ProjectionnoneETAnoneTarget Version3.0PR15Q1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0028188: Wrong information displayed after refresh a tab having an error when saving in grid view

DescriptionWrong information displayed after refresh a tab having an error when saving in grid view
Steps To ReproduceIn F&B
1) Go to the [Product] window
2) Select any product, for example Ale Beer
3) In grid view, uncheck the active checkbox and click on save. An error must appear as is not possible to deactivate a product with stock.
4) Refresh the window, notice that the active checkbox is not checked neither in form nor grid view. The correct information is not shown until we open and close the window again.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 00284693.0PR15Q2 closedAugustoMauch It is possible to save a masked string with incorrect length in grid view 
related to defect 0036459 closedcaristu error thrown when refreshing after cancelling row creation before FIC response is processed 

-  Notes
(0071883)
AugustoMauch (developer)
2014-11-21 12:17

Repository: erp/devel/pi
Changeset: 02671874363fb612b2c45a85e8ddf63a32bf7f87
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Nov 21 12:07:15 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/02671874363fb612b2c45a85e8ddf63a32bf7f87 [^] [^]

Fixes issue 28178: Local edits are discarded when the grid is refreshed

If there is a validation error when editing the row of a grid, that change is stored in the local edits of the grid, but not persisted in the database. The problem was that when the grid was refreshed the updated records returned by the datasource where being overwritten with the grid local changes.

This behaviour was wrong, when the grid is refreshed all changes should be discarded. To fix this, the local edits of the grid are discarded when the grid is refreshed, right after invalidating the cache.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
(0071943)
hgbot (developer)
2014-11-24 15:49

Repository: erp/devel/pi
Changeset: 138134afe781f2e87981bb3e8ba56f223bec20e8
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 24 13:05:08 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/138134afe781f2e87981bb3e8ba56f223bec20e8 [^]

Related with issue 28188: Handle better the records with validation errors

When a record is saved and it has a validation errors, its _hasValidationErrors flag is set to true. At no point this flag was set to false when the validation errors were solved (either by cancelling the
changes or by saving the record again after fixing the data).

Now the handling of the validation errores is done using the addRecordToValidationErrorList and removeRecordFromValidationErrorList functions. This functions not only set to true or false the _hasValidatio
nErrors flag, but also keep a list of the ids of the records that have validation errors. This allows to know at any point what records have validation errors without having to iterate the whole grid local
 data. Also a function has been added to check if the grid has any validation errors.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0071944)
hgbot (developer)
2014-11-24 15:49

Repository: erp/devel/pi
Changeset: bc62931cf7f8bbdb9d0c4e2c0ec92ae55bccc551
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 24 13:13:22 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/bc62931cf7f8bbdb9d0c4e2c0ec92ae55bccc551 [^]

Related with issue 28188: Disable refresh button if grid has validation errors

If any record of the grid has validation errors, disable the refresh toolbar button. If the user were to refresh the record while it had validation errors, the unsaved data would be lost.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0071945)
hgbot (developer)
2014-11-24 15:50

Repository: erp/devel/pi
Changeset: b1d40e3d4f77e545fcf4f34338e5980704b2980a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 24 15:44:51 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b1d40e3d4f77e545fcf4f34338e5980704b2980a [^]

Related with bug 28188:Enable the Cancel button if selected record has errors

The Cancel Changes toolbar button should be enabled if the selected record has validation errors, even if the record is not being currently edited. In this case, if the button is pushed then the local chan
ges of that record should be canceled.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
---
(0071946)
hgbot (developer)
2014-11-24 15:50

Repository: erp/devel/pi
Changeset: 5275962066ba7141f76cae3e5a80e4d9a86ed1e3
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Nov 24 15:49:17 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/5275962066ba7141f76cae3e5a80e4d9a86ed1e3 [^]

Fixes issue 28188: Backs out original fix, another approach is used

When the grid has data that has not been saved due to having validation errors, instead of allowing the user to refresh the record and get rid of the local changes, now the refresh button is disabled. The cancel button can be used to restore the data to the state it had before the validation errors, and once there are no more invalid records the refresh button will be enabled again.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0072137)
alostale (developer)
2014-11-28 14:20

The goal of the fix is to make consistent management of erroneous while in grid edition.

To test it:

case 1: in Product window edit Ale Beer and mark it as not enabled -> causes a backend validation error
case 2: in Product window edit any other product and set as null Name, which is mandatory -> causes a frontend validation error

In both cases the expected result is almost the same:

1. Edit icon appears with a red cross indicating the record has errors
2. Record background color is set to red
3. For case 2 the erroneous field is marked in red. This does not apply to case 1 because the validation doesn't point the problematic fields
4. Error message is shown in the message bar when navigating to Price subtab
5. Refresh button is disabled
6. Cancel changes button is enabled when the problematic record is selected
7. Cancel changes button is enabled when selecting several problematic errors, being possible to cancel changes for all of them at the same time
8. Popup appears when navigating to another tab to notify the user about the erroneous state
9. Record contextual menu (mouse right click) includes "Cancel changes" option.

Reopening the issue because for 1st case results for 4, 7, 8 and 9 are not as expected
(0072186)
hgbot (developer)
2014-12-01 12:11

Repository: erp/devel/pi
Changeset: 37c4fa35d6782cb943ef668a823fd7290ed9642d
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Dec 01 10:47:31 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/37c4fa35d6782cb943ef668a823fd7290ed9642d [^]

Related with issue 28188: Grid error handling is more homogeneous than before

This note [1] described four cases where the handling of validation errors detected in the front end was different thant the handling of validation errors detected in the back end. These three cases have been fixed by the present changeset:
- 7. Cancel changes button is enabled when selecting several problematic errors, being possible to cancel changes for all of them at the same time
- 8. Popup appears when navigating to another tab to notify the user about the erroneous state
- 9. Record contextual menu (mouse right click) includes "Cancel changes" option.

The mechanism to handle these cases was already in place, but was not working properly because:
- The OBViewGrid.ERROR_MESSAGE_PROP attribute was undefined. It has been undefined since the ob-view-grid.js file was created. Probably it had a value when the contents of ob-view-grid.js were stored in another filed and they were not copied to the new file. This property is set when it is detected that a row has a validation error and then it is checked in the OBViewGrid.hasError function.
- The OBViewGrid.hasError function was not working properly when the validation errors were detected in the backend. It was returning false if the grid was not currently being edited, so it was not reaching the point where the OBViewGrid.ERROR_MESSAGE_PROP attribute of the saved row was checked. The code that has been removed was used to fix this issue [2], which remains fixed even with those lines deleted.

[1] https://issues.openbravo.com/view.php?id=28188#c72137 [^]
[2] https://issues.openbravo.com/view.php?id=17377 [^]

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0072187)
hgbot (developer)
2014-12-01 12:11

Repository: erp/devel/pi
Changeset: a57ac42b2becc60c7dc81288d23584bedc6d9905
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Dec 01 12:06:50 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a57ac42b2becc60c7dc81288d23584bedc6d9905 [^]

Fixes bug 28188:Grid client-side and backend-side error handling is homogeneous

This changeset fixes the last case where the error handling of client-side and backend-side was not homogeneous:
- 4. Error message is shown in the message bar when navigating to Price subtab

To fix this, an error message is shown in the message bar when the backend validation error is detected after autosaving.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0072261)
alostale (developer)
2014-12-03 10:34

created test in TestLink: https://testlink.openbravo.com/testlink/linkto.php?tprojectPrefix=Communit&item=testcase&id=Communit-7980 [^]
(0072262)
alostale (developer)
2014-12-03 10:38

code reviewed

tested following with the test cases defined avobe
(0073130)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test
(0073131)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test
(0073132)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test
(0073133)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test
(0073157)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test
(0073158)
hudsonbot (developer)
2014-12-30 23: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/6525fe229e06 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2014-11-17 13:56 caristu New Issue
2014-11-17 13:56 caristu Assigned To => AugustoMauch
2014-11-17 13:56 caristu Modules => Core
2014-11-17 13:56 caristu Triggers an Emergency Pack => No
2014-11-17 13:56 caristu Target Version => 3.0PR15Q1
2014-11-17 16:12 heccam Issue Monitored: heccam
2014-11-21 11:47 AugustoMauch Issue Monitored: alostale
2014-11-21 11:47 AugustoMauch Review Assigned To => AugustoMauch
2014-11-21 12:17 AugustoMauch Note Added: 0071883
2014-11-21 12:17 AugustoMauch Status new => scheduled
2014-11-21 12:17 AugustoMauch fix_in_branch => pi
2014-11-21 12:17 AugustoMauch Status scheduled => resolved
2014-11-21 12:17 AugustoMauch Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/02671874363fb612b2c45a85e8ddf63a32bf7f87 [^]
2014-11-21 12:17 AugustoMauch Resolution open => fixed
2014-11-24 15:49 hgbot Checkin
2014-11-24 15:49 hgbot Note Added: 0071943
2014-11-24 15:49 hgbot Checkin
2014-11-24 15:49 hgbot Note Added: 0071944
2014-11-24 15:50 hgbot Checkin
2014-11-24 15:50 hgbot Note Added: 0071945
2014-11-24 15:50 hgbot Checkin
2014-11-24 15:50 hgbot Note Added: 0071946
2014-11-24 15:50 hgbot Fixed in SCM revision https://code.openbravo.com/erp/devel/pi/rev/02671874363fb612b2c45a85e8ddf63a32bf7f87 [^] => http://code.openbravo.com/erp/devel/pi/rev/5275962066ba7141f76cae3e5a80e4d9a86ed1e3 [^]
2014-11-24 16:50 AugustoMauch Review Assigned To AugustoMauch => alostale
2014-11-28 14:20 alostale Note Added: 0072137
2014-11-28 14:20 alostale Status resolved => new
2014-11-28 14:20 alostale Resolution fixed => open
2014-12-01 12:11 hgbot Checkin
2014-12-01 12:11 hgbot Note Added: 0072186
2014-12-01 12:11 hgbot Checkin
2014-12-01 12:11 hgbot Note Added: 0072187
2014-12-01 12:11 hgbot Status new => resolved
2014-12-01 12:11 hgbot Resolution open => fixed
2014-12-01 12:11 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/5275962066ba7141f76cae3e5a80e4d9a86ed1e3 [^] => http://code.openbravo.com/erp/devel/pi/rev/a57ac42b2becc60c7dc81288d23584bedc6d9905 [^]
2014-12-03 10:34 alostale Note Added: 0072261
2014-12-03 10:38 alostale Note Added: 0072262
2014-12-03 10:38 alostale Status resolved => closed
2014-12-03 10:38 alostale Fixed in Version => 3.0PR15Q1
2014-12-23 07:41 alostale Relationship added related to 0028469
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073130
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073131
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073132
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073133
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073157
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073158
2017-08-21 10:28 caristu Relationship added related to 0036459


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker