Bug 873525

Summary: unsaved indicator incorrect after first save or cancel
Product: [Retired] Zanata Reporter: Patrick Huang <pahuang>
Component: Component-LogicAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: unspecified Docs Contact:
Priority: high    
Version: developmentCC: sflaniga, zanata-bugs
Target Milestone: ---   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.0.3-SNAPSHOT (20121127-0017) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-26 03:46:28 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 Patrick Huang 2012-11-06 06:10:29 UTC
Description of problem:
Unsaved indicator only works for first time. After saving a message, altering its content again will not compare it with latest saved content but the content when first loaded.

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

How reproducible:
Always

Steps to Reproduce:
1. Go to translation editor
2. Find a message with translation, for example "foo"
3. Save as fuzzy
4. Change content from "foo" to "bar" (editor should indicate unsaved content)
5. Change content back from "bar" to "foo"
  
Actual results:
Unsaved indicator is still on

Expected results:
Unsaved indicator should be off since we have changed content back to latest saved value.

Additional info:

Comment 1 Patrick Huang 2012-11-06 06:15:20 UTC
Correction of Steps to reproduce:
1. Go to translation editor
2. Find a message with translation, for example "foo"
3. Change it to "bar" and save as fuzzy
4. Change content from "bar" to "bar 1" (editor should indicate unsaved content)
5. Change content back from "bar 1" to "bar"


Also note:
If at any time press ESC to cancel edit, after that unsaved indicator will not function any more

Comment 2 Patrick Huang 2012-11-09 01:22:05 UTC
committed into master and release:
https://github.com/zanata/zanata/commit/cd34f87e5d39804821b76274e69ec81951c6d4b8

Comment 4 Ding-Yi Chen 2012-11-27 06:20:32 UTC
VERIFIED with Zanata version 2.0.3-SNAPSHOT (20121127-0017)
and Zanata version 2.1-SNAPSHOT (20121127-1134)