Bug 1235070

Summary: Copied translations (using copy trans) should not be taken into account as contributions in the stats
Product: [Retired] Zanata Reporter: Carlos Munoz <camunoz>
Component: Component-LogicAssignee: Alex Eng <aeng>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: medium Docs Contact:
Priority: high    
Version: 3.6CC: aeng, dchen, djansen, zanata-bugs
Target Milestone: ---   
Target Release: 3.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.8.0-SNAPSHOT Doc Type: Bug Fix
Doc Text:
Story Points: 5
Clone Of: Environment:
Last Closed: 2016-01-21 01:40:26 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:

Description Carlos Munoz 2015-06-23 22:49:40 UTC
Description of problem:
The statistics API is currently taking into account copied translations and awarding credit to the original translator. In order to keep a more accurate track of a translator's contributions, copied translations should not be counted as 'Translated' strings. They should either be not counted, or counted as a different type of contribution.

Comment 1 David Mason 2015-06-24 06:32:32 UTC
This is caused because Copy Trans copies the original translator into the translator field.

Estimated implementation:

 - Need to record more metadata:
    - copied from copy version (100%)
    - copied with version merge (100%)
    - copied by copy trans ("project auto-fill") (100%)
    - copied with TM merge (100% can be copied as Translated)

 - Does metadata apply to just the revision, or stay on the text flow for its lifetime?
    - Just the history entry has it.
        Don't want later edits to be uncredited, since the point is to be able to see the amount of actual work done by a translator.
    - Wipe the metadata on the HTextFlowTarget when an edit is made.

        Changing from fuzzy to translated (without new text)
        will make a new revision. This is fine because you
        have contributed by reviewing it.

Technical note: wiping metadata when creating a revision is done for revision comments at the moment, so use that for reference.


Stats that should be influenced by not recording copies as translations:
 - User profile page (All contributions by a single user across all projects.)
 - Contribution API stats (Contributions to a particular project per-user.)

Comment 2 Alex Eng 2015-06-26 06:06:15 UTC
Pull request:

https://github.com/zanata/zanata-server/pull/888

Comment 3 Damian Jansen 2015-07-07 00:14:57 UTC
Verified at 70e87501e4b0bdbc8c03be446e384184dfa61285

Comment 4 Alex Eng 2015-07-07 06:17:38 UTC
Pull request:
release branch pull request:
https://github.com/zanata/zanata-server/pull/900