Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 826432

Summary: Concurrent editing of entries on the same page leads to editor closing and ghost translations
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: Component-UIAssignee: David Mason <damason>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: urgent    
Version: 1.6-SNAPSHOTCC: damason, zanata-bugs
Target Milestone: ---   
Target Release: 1.6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-03 05:27:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sean Flanigan 2012-05-30 07:56:34 UTC
Description of problem:
If two users edit the same page of the same document, changes made by one user will cause the other user to be kicked out of the editor, losing any changes.

Version-Release number of selected component (if applicable):
Zanata version 1.6.0-beta-2-SNAPSHOT (20120530-0019)

How reproducible:
100%

Steps to Reproduce:
1. user 1 edits document, opens the editor against a trans unit, say on page 1.
2. user 2 (in another browser) edits the same document.
3. user 2 saves a change to any trans unit on the same page (1).
  
Actual results:
user 1 is kicked out of the editor, losing any changes.  However, it *appears* that the changes were saved, because they are visible in the table as a ghost translation.

Expected results:
user 1 and user 2 both see the new saved value.  user 1 is still in the editor and can save or cancel.

Additional info:

Comment 1 David Mason 2012-05-30 09:25:53 UTC
Made a few changes in https://github.com/zanata/zanata/commit/2b949ed3822c1d48e1248e5a77464a7e64901c77 to try to detect when the user is editing, and re-focus the editor after updates. This has two side-effects that we may want to deal with:
 - editor remains open when another user updates the translation they have open, but the editor contents are replaced with the new contents.
 - the cursor returns to the beginning of the text box when saving as fuzzy.

Further checks using the new event.getUpdateType() may be useful in overcoming the side effects. Moving the editing check inside the else block may be useful.

Comment 2 David Mason 2012-06-01 01:44:58 UTC
Fixed in 1.6 release candidate.

Re-enabled cache clearing in row value set override method and used both value override methods for fuzzy updates in same tab of selected trans unit. Re-opening editor is still active.

Fuzzy save still causes the cursor position to be set to the beginning of the editor text area.


See https://github.com/zanata/zanata/commit/e726cfa4112e3f08cc4c7a1f5b0f90763bc9cbf5

Comment 3 Ding-Yi Chen 2012-06-07 00:59:03 UTC
VERIFIED: Zanata version 1.6.1-SNAPSHOT (20120606-0019)

Comment 4 Sean Flanigan 2012-06-27 06:14:49 UTC
I believe this was really fixed in time for 1.6.0.  Can we change the target release to 1.6 and close the bug?

Comment 5 Sean Flanigan 2012-06-27 06:16:19 UTC
If this wasn't fixed in 1.6.0, we should add the flag technical_note so that it makes it into the 1.6.1 release notes.