Red Hat Bugzilla – Bug 875973
Filter by content state with unsaved change may save twice
Last modified: 2013-02-25 22:46:29 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):
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.
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)
The active row should be saved as fuzzy only.
committed into release and master:
VERIFIED with Zanata version 2.0.3-SNAPSHOT (20121127-0017)
and Zanata version 2.1-SNAPSHOT (20121127-1134)