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, 6.0 has been updated
       via  01168641b13e75ac5f34025fb8b38ec0503d1cd5 (commit)
      from  2d1dc667d860ace8e422c8fcc013e86c5572c3ec (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 01168641b13e75ac5f34025fb8b38ec0503d1cd5
Author: Franck Villaume <[email protected]>
Date:   Sat Apr 11 14:05:57 2015 +0200

    project report: filter data such as task & artifact

diff --git a/src/www/project/report/index.php b/src/www/project/report/index.php
index 6cfb1a0..909b8a7 100644
--- a/src/www/project/report/index.php
+++ b/src/www/project/report/index.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2002-2004 (c) GForge Team
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014-2015, Franck Villaume - TrivialDev
  * http://fusionforge.org/
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -170,26 +170,28 @@ foreach ($group->getUsers() as $member) {
        $afu = new ArtifactsForUser($member);
        $artifacts = $afu->getAssignedArtifactsByGroup();
        foreach ($artifacts as $artifact) {
-               $cells = array();
-               $cells[][] = util_make_link('/tracker/?func=detail&aid='. 
$artifact->getID() 
.'&group_id='.$group_id.'&atid='.$artifact->ArtifactType->getID(), 
$artifact->ArtifactType->getName().' '.$artifact->getID());
-               $cells[][] = $artifact->getSummary();
-               $cells[][] = GetTime( time() - $artifact->getOpenDate());
-               $messages = db_query_params("select adddate FROM 
artifact_message_user_vw ".
-                                               "WHERE artifact_id=$1 ".
-                                               "ORDER by adddate DESC", 
array($artifact->getID()));
-               if ( db_numrows($messages)) {
-                       $cells[][] = GetTime(time() - db_result($messages, 0, 
'adddate'));
-               } else {
-                       $cells[][] = GetTime(time() - 
$artifact->getOpenDate());;
+               if (!$artifact->isError() && 
$artifact->ArtifactType->Group->getID() == $group_id) {
+                       $cells = array();
+                       $cells[][] = 
util_make_link('/tracker/?func=detail&aid='. $artifact->getID() 
.'&group_id='.$artifact->ArtifactType->Group->getID().'&atid='.$artifact->ArtifactType->getID(),
 $artifact->ArtifactType->getName().' '.$artifact->getID());
+                       $cells[][] = $artifact->getSummary();
+                       $cells[][] = GetTime( time() - 
$artifact->getOpenDate());
+                       $messages = db_query_params("select adddate FROM 
artifact_message_user_vw ".
+                                                       "WHERE artifact_id=$1 ".
+                                                       "ORDER by adddate 
DESC", array($artifact->getID()));
+                       if ( db_numrows($messages)) {
+                               $cells[][] = GetTime(time() - 
db_result($messages, 0, 'adddate'));
+                       } else {
+                               $cells[][] = GetTime(time() - 
$artifact->getOpenDate());;
+                       }
+                       echo $HTML->multiTableRow(array('class' => 
'priority'.$artifact->getPriority()), $cells);
                }
-               echo $HTML->multiTableRow(array('class' => 
'priority'.$artifact->getPriority()), $cells);
        }
        $ptfu = new ProjectTasksForUser($member);
        $tasks = $ptfu->getTasksByGroupProjectName();
        foreach ($tasks as $task) {
-               if ($task-> getPercentComplete() != 100) {
+               if (!$task->isError() && $task->ProjectGroup->Group->getID() == 
$group_id && $task->getPercentComplete() != 100) {
                        $cells = array();
-                       $cells[][] = 
util_make_link('/pm/task.php?func=detailtask&project_task_id='. 
$task->getID().'&group_id='.$group_id.'&group_project_id='.$task->ProjectGroup->getID(),_('Task').'
 '.$task->getID());
+                       $cells[][] = 
util_make_link('/pm/task.php?func=detailtask&project_task_id='. 
$task->getID().'&group_id='.$task->ProjectGroup->Group->getID().'&group_project_id='.$task->ProjectGroup->getID(),_('Task').'
 '.$task->getID());
                        $cells[][] = $task->getSummary();
                        $cells[][] = GetTime(time()-$task->getStartDate());
                        $cells[][] = $task->getPercentComplete().'% '._('done');

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

Summary of changes:
 src/www/project/report/index.php |   32 +++++++++++++++++---------------
 1 file changed, 17 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to