Bug 848988 - RFE: Clients side support of Translation Documents Statistic via REST
RFE: Clients side support of Translation Documents Statistic via REST
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
unspecified
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.0
Assigned To: Runa Bhattacharjee
Ding-Yi Chen
:
Depends On: 831894
Blocks: 756657
  Show dependency treegraph
 
Reported: 2012-08-16 22:14 EDT by Ding-Yi Chen
Modified: 2013-03-03 21:22 EST (History)
7 users (show)

See Also:
Fixed In Version: 1.8.0-SNAPSHOT (20120822-0015)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 831894
Environment:
Last Closed: 2012-11-07 01:19:28 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ding-Yi Chen 2012-08-16 22:14:01 EDT
+++ This bug was initially created as a clone of Bug #831894 +++

Split from Bug #759983 point number 2. It sort of overlaps a bit with Bug #831887

Currently there isn't a proper way to tell what percentage a Translation Document is at via the REST API without trying to manually calculate it using the number of strings in the Source Document and the number of available translated text-flows in the Translation Document. As such it would be handy if there was a mechanism to get this type of information via the REST API.

--- Additional comment from sflaniga@redhat.com on 2012-06-14 13:39:27 EST ---

Would you want to fetch all locale stats for a document at once, or separately?

--- Additional comment from mcaspers@redhat.com on 2012-06-19 13:40:17 EST ---

Stats would be fetched at the document level and at the view, and return stats for all locales at once.


--- Additional comment from camunoz@redhat.com on 2012-08-13 10:28:57 EST ---

Reassigning to add client enhancements.

--- Additional comment from camunoz@redhat.com on 2012-08-13 13:42:29 EST ---

Added java and maven client statistics commands. For details on usage type mvn zanata:help -Dgoal=stats -Ddetail

Zanata maven client 1.8.0-SNAPSHOT

See:
https://github.com/zanata/zanata/commit/b3628c711f5e8239387902291aaf04f915d1ab24
https://github.com/zanata/zanata/commit/201587b0c50d78b54de3b7e13e40c9af5a40dea8
https://github.com/zanata/zanata/commit/89527b89a61e425723487185ae5cc3943c322fdb
Comment 1 Ding-Yi Chen 2012-08-20 22:46:43 EDT
Tested with Zanata version 1.8.0-SNAPSHOT (20120821-1123)
maven client API version: 1.8.0-SNAPSHOT

In include detail mode (-Dzanata.details), if the project version contains  documents without content, it returns HTTP 500 error.

Step to reproduce:
mvn -e zanata:stats -Dzanata.project=SELinuxGuide -Dzanata.projectVersion=f12 -Dzanata.details

Actual result:

Expect result:
Run without error, while the statistic of empty documents should also correctly shown. i.e. Total:0, translated:0,  NeedReview:0,   Untranslated: 0

Reassigned.
Comment 2 Carlos Munoz 2012-08-21 00:37:18 EDT
Fixed for documents with no translation units. The UI should show '(No Content)' as usual, and the REST API will show 'Total:0, translated:0,  NeedReview:0,   Untranslated: 0'.

See:
https://github.com/zanata/zanata/commit/0c549aa710d0c5e3a810d1fadeecf787cb0e0363
Comment 3 Ding-Yi Chen 2012-08-22 00:13:49 EDT
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20120822-0015)
client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT
Comment 4 Sean Flanigan 2012-11-07 01:19:28 EST
Fix released in Zanata 2.0.

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