This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 889411 - Red border indicating failed validation shows on strings without validation warning/error
Red border indicating failed validation shows on strings without validation w...
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-UI (Show other bugs)
2.0
Unspecified Linux
unspecified Severity high
: ---
: 2.1
Assigned To: Patrick Huang
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-21 00:30 EST by Hedda Peters
Modified: 2013-02-25 23:06 EST (History)
3 users (show)

See Also:
Fixed In Version: 2.1-SNAPSHOT (20130107-1432)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-25 23:06:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Hedda Peters 2012-12-21 00:30:40 EST
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0
Build Identifier: 

Some strings, as soon as I save them, do get a red border even though there is no validation warning or error in those strings. 

Reproducible: Didn't try

Steps to Reproduce:
Not sure if reproducable any certain way. Happens occasionally, haven't found a pattern yet.
Actual Results:  
Red border on strings without error

Expected Results:  
No red border
Comment 2 Patrick Huang 2013-01-01 18:07:58 EST
I've fixed something in below commit before this bug is reported. But doesn't seem to be the cause after I review it.
https://github.com/zanata/zanata/commit/61766b0910a5581f6a0943fdfd3ad096aa74c4ce

How to reproduce the error:
1. select a row that source string is capable of producing validation error. i.e. having %s variables in it.
2. go to next page

expected results:
next page entries will be validated correctly

actual result:
it will validate next page's target strings against previously selected source on previous page. This will cause wrong validation warning border to appear.
Comment 3 Patrick Huang 2013-01-03 00:36:10 EST
found the problem:
Steps to Reproduce (depend on timing):
1. find a document and select plain text entry with next entry that has something will trigger validation error. i.e. contains line break or %s variables. 
2. translation the plain text entry and input just plain text (should not have validation error)
3. save as approved 

Actual Results:
Selection moved to next row but red border appear in saving entry but no validation error.

Reason:
Move to next row happens in order. Source is selected first and then target. Seems like validation request is happening in between so source will point to next row but target is still in previous row. And it generates false warning.
Comment 4 Patrick Huang 2013-01-03 00:44:54 EST
committed into master:
https://github.com/zanata/zanata/commit/f904414d8821c75deb145afbc29a71a5f1bd290e

Ensure source and target id equality in validation.
Comment 5 Patrick Huang 2013-01-03 00:49:38 EST
This bug is more likely to happen with plain text area as editor. Since we use a timer to fire value change event.
Comment 6 Ding-Yi Chen 2013-01-06 23:50:11 EST
VERIFIED with Zanata version 2.1-SNAPSHOT (20130107-1432)

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