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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0028178
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorhave not tried2014-11-14 14:412014-12-30 23:26
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in Version3.0PR15Q1
StatusclosedFix in branchFixed in SCM revisionef0ca38cde5d
ProjectionnoneETAnoneTarget Version
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

0028178: Disable the Refresh toolbar button while a refresh is ongoing

DescriptionIf the request done when refreshing takes some time, the user might have time to click the Refresh toolbar button several times. In that case, a request is done each time the button is clicked, even if the previous requests are ongoing.

It is better to prevent the user from clicking the button if the grid is currently being refreshed. This will prevent accidentally clicking the button several times, which would result in sending unneeded requests to the server.
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0025811 closedAugustoMauch unnecessary request on grid refresh 
related to feature request 0028179 newAugustoMauch Give some visual feedback in the Refesh toolbar button whhen the grid is being refreshed 

-  Notes
(0071880)
hgbot (developer)
2014-11-21 12:14

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
---
(0071882)
AugustoMauch (developer)
2014-11-21 12:16

Closed accidentally due to error in commit message
(0071927)
hgbot (developer)
2014-11-24 11:07

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

Fixes issue 28178: Disable refresh button while the view is being refreshed

Before the fix, the user could press the refresh toolbar button several times before the response of the first one was received. This could result in the server being overloaded. To prevent this, now when
then user clicks on the refresh toolbar button, the button is disabled until the response is received.

To ensure that the refresh button is always enabled even if an error happens, the button is being enabled in several places:
- If the refresh process is successful: In the callback of the refresh function.
- If there is an error between the refresh function is called and the request is actually sent: In a try/catch block
- If the server returns with an error code: In the RPCManager.handleError function

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/toolbar/ob-toolbar.js
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
M modules/org.openbravo.userinterface.smartclient/web/org.openbravo.userinterface.smartclient/js/ob-smartclient.js
---
(0071928)
hgbot (developer)
2014-11-24 11:11

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

Related with issue 28178: Revert changes made for debugging purposes

---
M modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/DataSourceServlet.java
M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java
---
(0071929)
AugustoMauch (developer)
2014-11-24 11:21

Tips for testing:
- Add a Thread.sleep statement to the DefaultJsonDataService.fetch method to slow down the refresh and see that the button is actually being disabled
- Force an error in the response of the datasource by throwing an AccessTableNoView exception (see how to do it in the changeset [1])

[1] https://code.openbravo.com/erp/devel/pi/rev/31a1f49e05a85da4d852c678df1acf97ef5be301 [^]
(0072124)
alostale (developer)
2014-11-28 12:46

code reviewed

Tested:
-While refreshing the UI changes
-During this time clicking on the refresh button does not generate extra request
-In case of failure in the request, it is properly handled and the refresh button is enabled again
(0073122)
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
(0073128)
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
(0073129)
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-14 14:41 AugustoMauch New Issue
2014-11-14 14:41 AugustoMauch Assigned To => AugustoMauch
2014-11-14 14:41 AugustoMauch Modules => Core
2014-11-14 14:41 AugustoMauch Triggers an Emergency Pack => No
2014-11-14 14:45 AugustoMauch Relationship added related to 0025811
2014-11-14 14:51 AugustoMauch Relationship added related to 0028179
2014-11-21 12:14 hgbot Checkin
2014-11-21 12:14 hgbot Note Added: 0071880
2014-11-21 12:14 hgbot Status new => resolved
2014-11-21 12:14 hgbot Resolution open => fixed
2014-11-21 12:14 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/02671874363fb612b2c45a85e8ddf63a32bf7f87 [^]
2014-11-21 12:16 AugustoMauch Note Added: 0071882
2014-11-21 12:16 AugustoMauch Status resolved => new
2014-11-21 12:16 AugustoMauch Resolution fixed => open
2014-11-24 11:07 hgbot Checkin
2014-11-24 11:07 hgbot Note Added: 0071927
2014-11-24 11:07 hgbot Status new => resolved
2014-11-24 11:07 hgbot Resolution open => fixed
2014-11-24 11:07 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/02671874363fb612b2c45a85e8ddf63a32bf7f87 [^] => http://code.openbravo.com/erp/devel/pi/rev/ef0ca38cde5d086d7840404b1212c0535d727a21 [^]
2014-11-24 11:11 hgbot Checkin
2014-11-24 11:11 hgbot Note Added: 0071928
2014-11-24 11:21 AugustoMauch Note Added: 0071929
2014-11-28 12:46 alostale Review Assigned To => alostale
2014-11-28 12:46 alostale Note Added: 0072124
2014-11-28 12:46 alostale Status resolved => closed
2014-11-28 12:46 alostale Fixed in Version => 3.0PR15Q1
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073122
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073128
2014-12-30 23:26 hudsonbot Checkin
2014-12-30 23:26 hudsonbot Note Added: 0073129


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker