MantisBT - v2.0 Release (Closed)
View Issue Details
0000415v2.0 Release (Closed)[All Projects] Generalpublic2010-04-29 06:162010-06-21 21:17
Reportertrevormorse 
Assigned Totrevormorse 
PrioritynormalSeveritytrivialReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Versionv2.0.0 
Summary0000415: Project count on tabs different
DescriptionIf you have projects that are sub projects they show up in the count of projects on the associated task status, but not in the table for that status.

Additional InformationIn our case we have 6 projects "In Planning"

SELECT project_id, project_status, project_original_parent FROM projects WHERE project_status = 2;
+------------+----------------+-------------------------+
| project_id | project_status | project_original_parent |
+------------+----------------+-------------------------+
| 6 | 2 | 4 |
| 13 | 2 | 4 |
| 63 | 2 | 63 |
| 69 | 2 | 68 |
| 70 | 2 | 68 |
| 83 | 2 | 83 |
+------------+----------------+-------------------------+

This shows "In Planning(6)" on the tab, however the list of projects when clicking the tab shows 2 projects, 63 and 83.

I believe the difference is in the way the projects are processed in the two areas.

When creating the count for the tab, the code checks that the project matches the status and is active.

/modules/projects/index.php:114
if ($p['project_status'] == $key && $p['project_active'] > 0) {

When deciding whether to show the project in the list is also checks that the project_id == project_original_parent

/modules/projects/vw_idx_projects.php:171
if ($row['project_id'] == $row['project_original_parent']) {

This can be rectified by changing the line 114 in index.php to
if ($p['project_status'] == $key && $p['project_active'] > 0 && $p['project_id'] == $p['project_original_parent']) {

I'm not sure what the intended behavior here should be though. Should we be showing the sub projects on the page, or not showing them and therefore not counting them on the tab?

More then willing to fix once I have direction!
TagsNo tags attached.
has duplicate 0000427closed caseydk v2.0 Release (Closed) Sub Project doesn't show up in Project list if user has no permission to parent project 
has duplicate 0000442closed caseydk v1.3 Release (Closed) Subprojects are not always shown in Project list 
Attached Files

Notes
(0000853)
trevormorse   
2010-05-04 11:23   
Fixed in git, pull request sent. Should be in subversion shortly.

Issue History
2010-04-29 06:16trevormorseNew Issue
2010-05-04 11:22trevormorseAssigned To => trevormorse
2010-05-04 11:22trevormorseStatusnew => assigned
2010-05-04 11:23trevormorseNote Added: 0000853
2010-05-04 11:23trevormorseStatusassigned => resolved
2010-05-04 11:23trevormorseResolutionopen => fixed
2010-05-05 18:14caseydkRelationship addedhas duplicate 0000427
2010-05-14 08:05caseydkProjectv1.3 Release (Closed) => v2.0 Release (Closed)
2010-05-18 20:40caseydkRelationship addedhas duplicate 0000442
2010-06-21 21:17caseydkStatusresolved => closed
2010-06-21 21:17caseydkFixed in Version => v2.0