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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0019740
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajoralways2012-02-13 13:142012-03-02 15:37
ReporterVictorVillarView Statuspublic 
Assigned ToAugustoMauch 
PriorityurgentResolutionfixedFixed in Version3.0MP9
StatusclosedFix in branchFixed in SCM revision74e62c9cbec5
ProjectionnoneETAnoneTarget Version3.0MP9
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version3.0MP7.1SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0019740: Error message appears when you try to modify the Business information

DescriptionYou create a Business Partner, it is not a problem, you switch to any tab, modify any data, you can save.
But if the user switchs between tab and header and modifies data in both, and save first the header and then save the data of the tab an error appears:
"The record you are saving has already been changed by
another user or process. Refresh the data by clicking the refresh button, you will loose your current changes."
Steps To ReproduceAs group admin role,
Navigate to Business partner,
Select Bebidas Alegres, S.L. business partner

Go to customer tab:
  - Modify Credit line limit: 2
Save it.

Switch to header:
 -modify the Search key.
Save it.

Again, go to customer tab:
  - modify the Credit line limit: 4
save it. An error message appears:
"Saving failed. The record you are saving has already been changed by another user or process. Refresh the data by clicking the refresh button, you will loose your current changes."
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0020023 closedAugustoMauch Autosave is throwing a wrong error message 

-  Notes
(0045226)
AugustoMauch (manager)
2012-02-17 10:48
edited on: 2012-02-17 10:49

This problem happens in the following scenario:
- A view is saved
- A child view is active and belong to the same entity as the parent view
- If that child view is modified without being refreshed previously, it can not be saved.

This happens because of a mechanism to prevent concurrent writes to the same database table. When a record is opened, the timestamp of the last time the table it belongs to was modified is saved. When saving that record, this saved timestamp is compared with the current timestamp of the table. If they differ the changes can not be saved because someone has modified the table after the register was loaded.

In this case, both the header tab and the customer tab belong to the same database table: c_bpartner. When the header tab is saved, the timestamp of the table is updated. In that moment the timestamp of the customer tab expires, so it will not be table to be saved until it is refreshed.

(0045227)
hgbot (developer)
2012-02-17 11:12

Repository: erp/devel/pi
Changeset: 74e62c9cbec53578364f9b8758d263318d60a433
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Feb 17 11:10:34 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/74e62c9cbec53578364f9b8758d263318d60a433 [^]

Fixes issue 19740: Tabs sharing entity with saved parent are refreshed

---
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/main/ob-standard-view.js
---
(0045228)
AugustoMauch (manager)
2012-02-17 11:27

A new function has been created in ob-standard-view.js: refreshChildViewsWithEntity(entity). This function refreshes all the child views that belong to the same entity to the view that is being saved.

This function is called from the callback of ob-view-from.saveRow, and only if the saving process has been successful.
(0045229)
AugustoMauch (manager)
2012-02-17 11:34

If the steps described in the Steps To Reproduce section are followed, the error message should not appear, and the register should be saved.

Further tests:
- Open the Business Partner window
- Open a register (i.e. Sleep Well Hotels, Co.). The header tab belongs to the BusinessPartner entity.
- Some data is loaded in the Customer tab. This tab also belongs to the BusinessPartner entity.
- Move to the subtab Bank Account. It belongs to the BusibnessPartnerBankAccount entity.
- Move back to the header tab, make a change (i.e. change the Search Key) and save the changes.
- The Bank Account tab should not have been refreshed, but the Customer tab should have.
(0045230)
AugustoMauch (manager)
2012-02-17 11:35

The effect of this change is to refresh some views after a parent view is saved. I think it should not have any side effects, so the fix is not risky.
(0045298)
alostale (manager)
2012-02-21 10:30

Code reviewed and tested on pi@8e3bca6e8153
(0045879)
hudsonbot (developer)
2012-03-02 15:37

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/544d64e0c159 [^]

Maturity status: Test

- Issue History
Date Modified Username Field Change
2012-02-13 13:14 VictorVillar New Issue
2012-02-13 13:14 VictorVillar Assigned To => jonalegriaesarte
2012-02-13 13:14 VictorVillar Modules => Core
2012-02-13 13:14 VictorVillar Resolution time => 1335477600
2012-02-13 13:14 VictorVillar Issue Monitored: networkb
2012-02-13 13:23 VictorVillar Resolution time 1335477600 => 1331766000
2012-02-13 13:23 VictorVillar Priority high => urgent
2012-02-13 13:23 VictorVillar Severity minor => major
2012-02-13 13:23 VictorVillar Target Version 3.0MP10 => 3.0MP9
2012-02-13 17:56 jonalegriaesarte Assigned To jonalegriaesarte => alostale
2012-02-16 10:30 alostale Assigned To alostale => AugustoMauch
2012-02-17 10:48 AugustoMauch Note Added: 0045226
2012-02-17 10:49 AugustoMauch Note Edited: 0045226 View Revisions
2012-02-17 11:12 hgbot Checkin
2012-02-17 11:12 hgbot Note Added: 0045227
2012-02-17 11:12 hgbot Status new => resolved
2012-02-17 11:12 hgbot Resolution open => fixed
2012-02-17 11:12 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/74e62c9cbec53578364f9b8758d263318d60a433 [^]
2012-02-17 11:27 AugustoMauch Note Added: 0045228
2012-02-17 11:34 AugustoMauch Note Added: 0045229
2012-02-17 11:35 AugustoMauch Note Added: 0045230
2012-02-21 10:30 alostale Note Added: 0045298
2012-02-21 10:30 alostale Status resolved => closed
2012-02-21 10:30 alostale Fixed in Version => 3.0MP9
2012-03-02 15:37 hudsonbot Checkin
2012-03-02 15:37 hudsonbot Note Added: 0045879
2012-03-14 16:37 alostale Relationship added related to 0020023


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker