Bug 1220960 - [GWT Editor] Logic errors in how TM results are coalesced.
Summary: [GWT Editor] Logic errors in how TM results are coalesced.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic, TranslationEditor
Version: 3.7
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: ---
Assignee: Damian Jansen
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-12 23:29 UTC by David Mason
Modified: 2015-07-29 03:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-29 03:28:50 UTC
Embargoed:


Attachments (Terms of Use)

Description David Mason 2015-05-12 23:29:31 UTC
Description of problem:

In the code for translation memory search, multiple results that have the same source and translation text are combined into a single summary result.

Looking at the code where this happens (TranslationMemoryServiceImpl.addOrIncrementResultItem) it appears there are two problems:

 - result item is given the match type of whichever result appears first. The match type does not change even from 'translated' to 'approved', so the editor will always show the lower result type of 'translated'.

 - id for imported TM items is added to a list, which is later used to look up text flows. Since both use a Long type for the id, there is no error but it could return non-matching text flows that happen to have the same id as the imported TM item.

The ids are sent to the client by GetTransMemoryHandler, then the client returns them to GetTransMemoryDetailsHandler which uses them to look up text flows.


The DTOs should change to include all the match types that occur (rather than just a single match type), and the ID for imported TM items and text flows should be wrapped in distinct types so that GetTransMemoryDetailsHandler can treat each appropriately.

Comment 1 Zanata Migrator 2015-07-29 03:28:50 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-286


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