[Fusionforge-commits] FusionForge branch master updated. 4e5c09a822863d7ca219d2cda5d5e99c7b3800e6

Alain Peyrat aljeux at fusionforge.org
Thu May 23 10:58:41 CEST 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  4e5c09a822863d7ca219d2cda5d5e99c7b3800e6 (commit)
      from  b6f230d709445efb0a09d7e67c82f6424381d7f8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4e5c09a822863d7ca219d2cda5d5e99c7b3800e6
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Thu May 23 10:58:33 2013 +0200

    Fix reporting on task for period = lifetime

diff --git a/src/www/pm/reporting/index.php b/src/www/pm/reporting/index.php
index 6f2df94..d8a8b4f 100644
--- a/src/www/pm/reporting/index.php
+++ b/src/www/pm/reporting/index.php
@@ -86,7 +86,7 @@ if ($what) {
 		Update the database
 	*/
 
-	$period_threshold = time() - period2seconds($period, $span) ;
+	$period_threshold = period2timestamp($period, $span) ;
 
 	if ($what=="aging") {
 		$start = getIntFromRequest('start');
@@ -185,20 +185,21 @@ AND project_group_list.group_id=$3 ',
 FROM project_group_list,project_task
 WHERE project_group_list.group_project_id=project_task.group_project_id
 AND project_task.status_id = 1
-AND project_group_list.group_id=$1
-AND start_date >= $2
-GROUP BY subproject',
-					  array ($group_id,
-						 $period_threshold)) ;
-		$qpa2 = db_construct_qpa(false, 'SELECT project_group_list.project_name AS Subproject, count(*) AS Count
+AND project_group_list.group_id=$1', array ($group_id));
+		if ($period_threshold) {
+			$qpa1 = db_construct_qpa($qpa1, ' AND start_date >= $1 ', array ($period_threshold));
+		}
+		$qpa1 = db_construct_qpa($qpa1, ' GROUP BY subproject');
+
+		$qpa2 = db_construct_qpa(false, 'SELECT project_group_list.project_name AS subproject, count(*) AS Count
 FROM project_group_list,project_task
 WHERE project_group_list.group_project_id=project_task.group_project_id
 AND project_task.status_id <> 3
-AND project_group_list.group_id=$1
-AND start_date >= $2
-GROUP BY subproject',
-					  array ($group_id,
-						 $period_threshold)) ;
+AND project_group_list.group_id=$1', array ($group_id));
+		if ($period_threshold) {
+			$qpa2 = db_construct_qpa($qpa2, ' AND start_date >= $1 ', array ($period_threshold));
+		}
+		$qpa2 = db_construct_qpa($qpa2, ' GROUP BY subproject');
 
 		pm_quick_report($group_id,
 			  _('Tasks By Category'),
@@ -212,11 +213,11 @@ WHERE users.user_id=project_assigned_to.assigned_to_id
 AND project_assigned_to.project_task_id=project_task.project_task_id
 AND project_task.group_project_id=project_group_list.group_project_id
 AND project_task.status_id = 1
-AND project_group_list.group_id=$1
-AND start_date >= $2
-GROUP BY technician',
-					  array ($group_id,
-						 $period_threshold)) ;
+AND project_group_list.group_id=$1', array ($group_id));
+		if ($period_threshold) {
+			$qpa1 = db_construct_qpa($qpa1, ' AND start_date >= $1 ', array ($period_threshold));
+		}
+		$qpa1 = db_construct_qpa($qpa1, ' GROUP BY technician');
 
 		$qpa2 = db_construct_qpa(false, 'SELECT users.user_name AS technician, count(*) AS Count
 FROM users,project_group_list,project_task,project_assigned_to
@@ -224,11 +225,11 @@ WHERE users.user_id=project_assigned_to.assigned_to_id
 AND project_assigned_to.project_task_id=project_task.project_task_id
 AND project_task.group_project_id=project_group_list.group_project_id
 AND project_task.status_id <> 3
-AND project_group_list.group_id=$1
-AND start_date >= $2
-GROUP BY technician',
-					  array ($group_id,
-						 $period_threshold)) ;
+AND project_group_list.group_id=$1', array ($group_id));
+		if ($period_threshold) {
+			$qpa2 = db_construct_qpa($qpa2, ' AND start_date >= $1 ', array ($period_threshold));
+		}
+		$qpa2 = db_construct_qpa($qpa2, ' GROUP BY technician');
 
 		pm_quick_report($group_id,
 		  _('Tasks By Assignee'),

-----------------------------------------------------------------------

Summary of changes:
 src/www/pm/reporting/index.php |   45 ++++++++++++++++++++--------------------
 1 file changed, 23 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list