Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010896Openbravo ERPA. Platformpublic2009-10-07 13:202009-10-24 00:00
eduardo_Argal 
alostale 
immediatemajorhave not tried
closedfixed 
5
pi 
pi2.50MP8 
Core
No
0010896: Save action should not take into account elements that can not be updated by user (Example: buttons)
Save action should not take into account elements that can not be updated by user (Example: buttons)
main
Issue History
2009-10-07 13:20eduardo_ArgalNew Issue
2009-10-07 13:20eduardo_ArgalAssigned To => alostale
2009-10-07 13:20eduardo_ArgalStatusnew => scheduled
2009-10-07 13:20eduardo_Argalfix_in_branch => pi
2009-10-07 15:36alostaleNote Added: 0020853
2009-10-07 15:38alostaleNote Edited: 0020853
2009-10-13 10:31alostaleStatusscheduled => resolved
2009-10-13 10:31alostaleFixed in SCM revision => https://code.openbravo.com/erp/devel/pi-locking/rev/1ffa395af0f7 [^]
2009-10-13 10:31alostaleResolutionopen => fixed
2009-10-22 11:23plujanStatusresolved => closed
2009-10-22 18:17hgbotCheckin
2009-10-22 18:17hgbotNote Added: 0021345
2009-10-22 18:17hgbotStatusclosed => resolved
2009-10-22 18:17hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/devel/pi-locking/rev/1ffa395af0f7 [^] => http://code.openbravo.com/erp/devel/pi/rev/ad129c7d1b6285797d48188320a26d51bffbefbe [^]
2009-10-22 19:26psarobeTag Attached: main
2009-10-23 16:04plujanStatusresolved => closed
2009-10-23 16:04plujanFixed in Version => 2.50MP8
2009-10-24 00:00anonymoussf_bug_id0 => 2885057

Notes
(0020853)
alostale   
2009-10-07 15:36   
(edited on: 2009-10-07 15:38)
The solution for this issue cannot be not saving not updatable fields when the save action is performed, this would cause not saving read-only fields that could be modified by callouts and therefore should be saved.

Here the problem appears when the user opens a record in a tab and before saving it there is a modification on it (it can be done by another user or by a process). In this case when the record is tried to be saved, it's updated with obsolete information.

Therefore the solution for this issue would be to implement a locking mechanism for WAD windows. This locking mechanism at this stage will be quite light. It will just read the last updated time for the record when it is opened and before saving it again it will check the actual updated value in database is the same that was read at the beginning, and in case they differ no save action will be allowed.

**Note for QA**
This new feature is needed to be deeply tested because it affects the way records are saved. To facilitate the isolation for this testing, this implementation is going to be developed in a separate hg repository:

https://code.openbravo.com/erp/devel/pi-locking/ [^]

(0021345)
hgbot   
2009-10-22 18:17   
Repository: erp/devel/pi
Changeset: ad129c7d1b6285797d48188320a26d51bffbefbe
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Oct 22 18:16:52 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/ad129c7d1b6285797d48188320a26d51bffbefbe [^]

fixed bug 0010896: Implemented locking mechanism

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src-wad/src/org/openbravo/wad/Configuration_Edition.xmlxml
M src-wad/src/org/openbravo/wad/Template_Edition.html
M src-wad/src/org/openbravo/wad/datasource.xsqlxml
M src-wad/src/org/openbravo/wad/javasource.javaxml
M src/org/openbravo/base/secureApp/HttpSecureAppServlet.java
M src/org/openbravo/erpCommon/utility/NavigationBar.java
M web/js/utils.js
---