This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 875973 - Filter by content state with unsaved change may save twice
Filter by content state with unsaved change may save twice
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
development
Unspecified Unspecified
high Severity unspecified
: ---
: 2.0
Assigned To: Patrick Huang
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-12 19:29 EST by Patrick Huang
Modified: 2013-02-25 22:46 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.0.3-SNAPSHOT (20121127-0017)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-25 22:46:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Patrick Huang 2012-11-12 19:29:18 EST
Description of problem:
When user has unsaved change in editor and check the filter by state checkbox, a pop up will be displayed and asking user to save or discard current change before continue the filtering. Depending on the timing, the filtering load may happen in the middle of the saving and cause another pending save. See below for more information.

Version-Release number of selected component (if applicable):
2.0-

How reproducible:
Depending on the event timing and ordering

Steps to Reproduce:
1. Go to translation editor and type something in one row with approved translation (row indicates unsaved)
2. Click on Message filters option on editor options panel and select Translated 
3. In the filter confirmation pop up, select save as fuzzy
4. If you are in slow network, the saving indicator will appear quite a while and during "saving", the filter may finish earlier than the save and therefore override current saving row with old value.
  
Actual results:
After filter reload, before reload current page it will try to re-select current row and sees that current row has unsaved change, it will trigger another pending save event and push into saving queue. Then reload the page and override value to old value. So what you see from translation history is:
one fuzzy save(triggered by filter confirmation pop up)
one approved save(triggered by implicit pending change save)
unsaved change(after reload page editor value gets set back to original)

Expected results:
The active row should be saved as fuzzy only.

Additional info:
Comment 1 Patrick Huang 2012-11-13 00:00:36 EST
committed into release and master:
https://github.com/zanata/zanata/commit/6231a67a2d3738d73ffa9851a93fcae2559000fe
Comment 3 Ding-Yi Chen 2012-11-27 01:09:02 EST
VERIFIED with Zanata version 2.0.3-SNAPSHOT (20121127-0017)
and Zanata version 2.1-SNAPSHOT (20121127-1134)

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