Bug 1033446

Summary: Obsolete projects are not disregarded in the Group stats
Product: [Retired] Zanata Reporter: Damian Jansen <djansen>
Component: Component-LogicAssignee: Alex Eng <aeng>
Status: CLOSED CURRENTRELEASE QA Contact: Damian Jansen <djansen>
Severity: high Docs Contact:
Priority: unspecified    
Version: developmentCC: dchen, zanata-bugs
Target Milestone: ---   
Target Release: 3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-18 06:48: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:
Attachments:
Description Flags
Screenshot of error none

Description Damian Jansen 2013-11-22 06:26:54 UTC
Description of problem:
Obsolete projects should not be displayed in a group's projects lists or be counted towards the stats of the group

Version-Release number of selected component (if applicable):
dev

How reproducible:
Easy, always

Steps to Reproduce:
Preconditions:
- Two projects exist - both with a source document
- One of the projects is obsolete
1. Sign in, go to groups, select a group
2. Add the ACTIVE project to the group (Go to Settings -> Projects, Add)
   - Note the values for translated/total hours have increased
3. Add the OBSOLETE project to the group

Actual results:
The numbers have increased to accomodate the obsolete project

Expected results:
The numbers should only refer to the active projects

Additional info:
Also occurs if an group added project is made obsolete while part of a group

Comment 1 Alex Eng 2013-11-24 23:48:31 UTC
Pull request:
https://github.com/zanata/zanata-server/pull/290

Comment 2 Damian Jansen 2013-11-25 03:11:48 UTC
The fix also removes READONLY projects, which I believe is not favourable.

Comment 3 Alex Eng 2013-11-25 03:15:45 UTC
Pull request:
https://github.com/zanata/zanata-server/pull/293

Comment 4 Damian Jansen 2013-11-25 03:28:34 UTC
Created attachment 828496 [details]
Screenshot of error

Also, the number of warnings against a language still recognises obsolete projects.

i.e. if two active projects and one obsolete project are part of a group and all have disabled a language, only two of those should show as warnings.
Only two items show in the list, but the number shows three.

Comment 5 Damian Jansen 2013-11-25 06:06:07 UTC
The READONLY project successfully showed in the group, once - but caused an exception after that when clicked. Now again it won't show at all.

Comment 6 Damian Jansen 2013-11-25 06:15:45 UTC
Never mind about the "won't show at all" - I didn't realise that the set OBSOLETE on a project filters down through its versions, thus is not reverted when the project is made ACTIVE. i.e. I had to make the project version ACTIVE also.
Exception still there.

1. Make a project version in the group READONLY
2. Click on the Languages tab
3. Click on a Language

Comment 7 Alex Eng 2013-11-25 22:23:16 UTC
Pull request:
https://github.com/zanata/zanata-server/pull/296

Comment 8 Damian Jansen 2013-11-26 00:49:33 UTC
This appears to behave better.
Verified at 19c23e1a933e97cb309638a92053d139f26fedd0