Bug 1064737
Summary: | Statistics on locale documents page are incorrect (inconsistent with project version and editor) | ||
---|---|---|---|
Product: | [Retired] Zanata | Reporter: | Ding-Yi Chen <dchen> |
Component: | Component-Logic | Assignee: | Alex Eng <aeng> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
Severity: | urgent | Docs Contact: | |
Priority: | urgent | ||
Version: | 3.2 | CC: | aeng, camunoz, sflaniga, zanata-bugs |
Target Milestone: | --- | ||
Target Release: | 3.3 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 3.3.0-SNAPSHOT (20140217-1515) | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-03-20 05:47:25 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: | |
Embargoed: |
Description
Ding-Yi Chen
2014-02-13 08:23:33 UTC
The problem can be seen by comparing the JSF pages, without having to look at the GWT editor. Just add up the stats on the JSF documents page for one of the locales (apparently wrong) and compare to the project version page's stats for that locale (apparently correct). The stats on the project version page agree with the project group page and with the editor's doclist stats, and the total number of textflows in a document there agrees with the database. Both pages uses different method on constructing the statistic, editor uses : StatisticServiceImpl.getDocStatistics(Long documentId, LocaleId localeId) jsf uses: StatisticServiceImpl.getStatistics(String projectSlug, String iterationSlug, String docId, boolean includeWordStats, String[] locales) StatisticServiceImpl.getStatistics(String projectSlug, String iterationSlug, String docId, boolean includeWordStats, String[] locales) [currently broken] should call StatisticServiceImpl.getDocStatistics(Long documentId, LocaleId localeId) [working]. The difference between these 2 are the single sql query on multiple locales which perform better compare to looping through StatisticServiceImpl.getDocStatistics(Long documentId, LocaleId localeId). Ah okay, we should revisit it later then, whilst doing what we can to share logic between the two cases. But in the meantime, accuracy trumps performance. Wait, what's the use case for fetching all the locale stats for a single document? Where do we show that? Pull request: https://github.com/zanata/zanata-server/pull/376 Sean, Multiple locales options are only used in client - statistics command VERIFIED with Zanata 3.3.0-SNAPSHOT (20140217-1515) Just to clarify, with this bug: - the locale documents page (JSF) had the wrong statistics - the project version page (JSF) and the editor doclist (GWT) had the correct statistics The locale documents page has been corrected so that its statistics now agree with the other two pages. Closing VERIFIED bugs for Zanata server 3.3.2. |