Bugzilla will be upgraded to version 5.0 on December 2, 2018. The outage period for the upgrade will start at 0:00 UTC and have a duration of 12 hours
Bug 958350 - Concurrent save on different row causes incorrect validation warnings in current row.
Concurrent save on different row causes incorrect validation warnings in curr...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Retired
Component: Component-UI (Show other bugs)
2.3
Unspecified Unspecified
unspecified Severity high
: ---
: 2.3
Assigned To: David Mason
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-30 23:13 EDT by David Mason
Modified: 2013-11-26 22:35 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.3.2-SNAPSHOT (20130506-1140)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-26 22:23:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Mason 2013-04-30 23:13:08 EDT
Description of problem:
When in the editor, if a different row on the same page has a translation saved in another tab, the currently enabled validations are run on the updated translation and warnings are incorrectly applied to the currently selected row instead of the changed row.
Warnings remain on the row even when moving away, but are cleared when selecting the row that has the wrong warnings showing.
This does not happen when rows on a different page are changed.
This will happen regardless whether it is the same user or a different user making the change.

Version-Release number of selected component (if applicable):
version 3.0.0-SNAPSHOT (20130501-1233)
This is equivalent to 2.3 Release at the time of testing.

How reproducible:
Always

Steps to Reproduce:
1. Sign in and open a document with multiple pages of strings in the editor (tabA). Make sure some validators are active.
2. Open the same URL in a new browser window or tab (tabB)
3. In tabA, select a row that has no validation warnings
4. In tabB, select a different row on the same page and enter some text that causes validation warnings (try adding newlines, %x, {x}). Save the text.

Actual results:
In tabA, validations are displayed on the row that should not have any validation warnings.

Expected results:
The new validation warnings are shown on the row that was updated, not on the currently selected row.

Additional info:
Comment 1 David Mason 2013-05-01 23:53:03 EDT
It turns out the updated target is being validated against the currently selected source. This means that step 4. should be:

4. In tabB, select a different row on the same page and enter some text that would cause validation warnings if it were entered in the row that is selected in tabA.


e.g. if tabA has a row selected with source "Hello World" and tabB has a row selected with source "Hello {name}", and the translation "Hi {name} is saved in tabB, no warning is shown in tabB, but in tabA a warning will be shown about unexpected variable '{name}'.
Comment 2 David Mason 2013-05-02 04:01:30 EDT
Replaced code that assumed validation would always be for the current row. Warnings for concurrently updated translations should now show on the correct row.

See: https://github.com/zanata/zanata/commit/6e6f68d5c3447d5ec4d00b08af8aa7188e7b4496
Comment 3 Ding-Yi Chen 2013-05-05 22:24:24 EDT
VERIFIED with Zanata version 2.3.2-SNAPSHOT (20130506-1140) and 
Zanata version 3.0.0-SNAPSHOT (20130505-1232)
Comment 4 Sean Flanigan 2013-11-26 22:13:19 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 5 Sean Flanigan 2013-11-26 22:15:23 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 6 Sean Flanigan 2013-11-26 22:18:36 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 7 Sean Flanigan 2013-11-26 22:23:15 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 8 Sean Flanigan 2013-11-26 22:33:16 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 9 Sean Flanigan 2013-11-26 22:35:32 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.

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