Bug 841720 - [Project-wide search replace] Uninvolved entries are mistakely wiped out when undo in search both mode
[Project-wide search replace] Uninvolved entries are mistakely wiped out when...
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: 1.7
Assigned To: David Mason
Ding-Yi Chen
Depends On:
  Show dependency treegraph
Reported: 2012-07-19 21:50 EDT by Ding-Yi Chen
Modified: 2012-09-12 20:09 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.7.0-alpha-2-SNAPSHOT (20120720-1208)
Doc Type: Bug Fix
Doc Text:
Cause: When performing an undo of a project-wide search-and-replace operation, all involved text flows were reverted to the previous version, even if they were not modified by the search-and-replace operation. Consequence: Text flows without any replacements made in the translation text would revert to an old translation, or become empty if there was only one translation in the text flow's history. Fix: Prevented system trying to undo text flows that were not changed. Result: Undo of project-wide search-and-replace will not revert any changes that were not part of the corresponding search-and-replace operation.
Story Points: ---
Clone Of:
Last Closed: 2012-09-11 01:11:19 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 Ding-Yi Chen 2012-07-19 21:50:20 EDT
Description of problem:

After performed project-wid search and replace in "search both mode", undo the replace will mistakely wipe out the uninvolved entries, which do not have the search term in target.

Version-Release number of selected component (if applicable):
Zanata version 1.7-SNAPSHOT (20120720-0026)

How reproducible:

Steps to Reproduce:
1. Visit a document.
2. Find two rows  (row A and row B), that contains same word. Suppose the word is "TERM"
3. Click at row A, copy from source, but remove "TERM", save as approved
4. Click at row B, copy from source, save as approved
5. Click search and replace, and select "search both".
6. Search "TERM", click "select all",  and relace with "WORD"
   You should see that row B is replaced, but row A is untouched.
7. Click on notification panel, click "undo"
Actual results:
Content of row A is wiped out.

Expected results:
Content of row A is kept.

Additional info:
Comment 1 David Mason 2012-07-19 22:08:22 EDT
Prevented system trying to undo text flows that were not changed.

See https://github.com/zanata/zanata/commit/f8f003e9dce5e15baf653746f08fc47875afc1a2
Comment 2 Ding-Yi Chen 2012-07-20 00:31:18 EDT
VERIFIED with Zanata version 1.7.0-alpha-2-SNAPSHOT (20120720-1208)

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