Bug 826432 - Concurrent editing of entries on the same page leads to editor closing and ghost translations
Concurrent editing of entries on the same page leads to editor closing and gh...
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
Unspecified Unspecified
urgent Severity high
: ---
: 1.6.1
Assigned To: David Mason
Ding-Yi Chen
Depends On:
  Show dependency treegraph
Reported: 2012-05-30 03:56 EDT by Sean Flanigan
Modified: 2012-07-03 01:27 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-03 01:27:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2012-05-30 03:56:34 EDT
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:

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 05:25:53 EDT
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-05-31 21:44:58 EDT
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-06 20:59:03 EDT
VERIFIED: Zanata version 1.6.1-SNAPSHOT (20120606-0019)
Comment 4 Sean Flanigan 2012-06-27 02:14:49 EDT
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 02:16:19 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.