The sum of percentages, Σ, isn't correctly calculated. It calculates only for "open" projects.
The page /packages/intranet-ganttproject/gantt-resources-cube?… presents a matrix with the percentages of participation on projects for each user, as well as for each project.
That means the sum (total) for all projects, Σ, and its partial percentages for each project associated with every user.
The issue is that the system considers only projects with its status set as "open", instead of "open" and its subcategories if there are any.
We can verify the problem by going to the page /packages/intranet-ganttproject/gantt-resources-cube? , filtering by date and clicking on '+' button. The percentages showed for Σ are wrong and show the results only for "open" projects, instead of the sum of all projects and its partials of each project in the lines bellow.
The code responsible for that is within the file /packages/intranet-ganttptoject/tcl/intranet-ganttptoject-procs.tcl in the ad_proc im_ganttproject_resource_component at line 1544.
…
if {"" == $project_id} {
set project_id [db_list pids "
select project_id
from im_projects
where parent_id is null
- and project_status_id in ([join ","])
++ and project_status_id in ([join [im_sub_categories ] ","])
"]
}
…
The problems is related to the fact that ]PO[ isn't prepared to handle subcategories of "Open", i.e. project_status category. To fix the sum we must add im_sub_categories at the "AND" statement as showed above.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Gantt Resources
The sum of percentages, Σ, isn't correctly calculated. It calculates only for "open" projects.
The page /packages/intranet-ganttproject/gantt-resources-cube?… presents a matrix with the percentages of participation on projects for each user, as well as for each project.
That means the sum (total) for all projects, Σ, and its partial percentages for each project associated with every user.
The issue is that the system considers only projects with its status set as "open", instead of "open" and its subcategories if there are any.
We can verify the problem by going to the page /packages/intranet-ganttproject/gantt-resources-cube? , filtering by date and clicking on '+' button. The percentages showed for Σ are wrong and show the results only for "open" projects, instead of the sum of all projects and its partials of each project in the lines bellow.
The code responsible for that is within the file /packages/intranet-ganttptoject/tcl/intranet-ganttptoject-procs.tcl in the ad_proc im_ganttproject_resource_component at line 1544.
…
if {"" == $project_id} {
set project_id [db_list pids "
select project_id
from im_projects
where parent_id is null
- and project_status_id in ([join ","])
++ and project_status_id in ([join [im_sub_categories ] ","])
"]
}
…
The problems is related to the fact that ]PO[ isn't prepared to handle subcategories of "Open", i.e. project_status category. To fix the sum we must add im_sub_categories at the "AND" statement as showed above.
Hi Iuri,
Thanks for reporting.
I have updated intranet-ganttproject-procs.tcl in CVS HEAD.
I couldn't test if that really fixes the issue, could you please confirm?
Cheers,
Frank