[Fusionforge-commits] r12199 - in trunk/src: common/tracker www/tracker/include

Roland Mas lolando at libremir.placard.fr.eu.org
Wed Feb 9 16:15:17 CET 2011


Author: lolando
Date: 2011-02-09 16:15:14 +0100 (Wed, 09 Feb 2011)
New Revision: 12199

Modified:
   trunk/src/common/tracker/Artifact.class.php
   trunk/src/www/tracker/include/ArtifactTypeHtml.class.php
Log:
Display status of related tasks in trackers

Modified: trunk/src/common/tracker/Artifact.class.php
===================================================================
--- trunk/src/common/tracker/Artifact.class.php	2011-02-09 12:25:05 UTC (rev 12198)
+++ trunk/src/common/tracker/Artifact.class.php	2011-02-09 15:15:14 UTC (rev 12199)
@@ -717,10 +717,11 @@
 	 */
 	function getRelatedTasks() {
 		if (!$this->relatedtasks) {
-			$this->relatedtasks = db_query_params ('SELECT pt.group_project_id,pt.project_task_id,pt.summary,pt.start_date,pt.end_date,pgl.group_id, pt.status_id
-			FROM project_task pt, project_group_list pgl
-			WHERE pt.group_project_id = pgl.group_project_id AND
-			EXISTS (SELECT project_task_id FROM project_task_artifact
+			$this->relatedtasks = db_query_params ('SELECT pt.group_project_id,pt.project_task_id,pt.summary,pt.start_date,pt.end_date,pgl.group_id,pt.status_id,ps.status_name
+			FROM project_task pt, project_group_list pgl, project_status ps
+			WHERE pt.group_project_id = pgl.group_project_id
+                        AND ps.status_id = pt.status_id
+                        AND EXISTS (SELECT project_task_id FROM project_task_artifact
 				WHERE project_task_id=pt.project_task_id
 				AND artifact_id = $1)',
 							       array ($this->getID())) ;

Modified: trunk/src/www/tracker/include/ArtifactTypeHtml.class.php
===================================================================
--- trunk/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-02-09 12:25:05 UTC (rev 12198)
+++ trunk/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-02-09 15:15:14 UTC (rev 12199)
@@ -300,6 +300,14 @@
 		if ($taskcount > 0) {
 			echo '<tr><td colspan="2">';
 			echo '<b>'._("Related Tasks").':</b>'.'<br/>';
+			$title_arr = array();
+			$title_arr[] = _('Task Id');
+			$title_arr[] = _('Task Summary');
+			$title_arr[] = _('Start Date');
+			$title_arr[] = _('End Date');
+			$title_arr[] = _('Status');
+			echo $GLOBALS['HTML']->listTableTop($title_arr);
+
 			echo '<table cellspacing="0">';
 			for ($i = 0; $i < $taskcount; $i++) {
 				$taskinfo  = db_fetch_array($ah->relatedtasks, $i);
@@ -309,14 +317,16 @@
 				$summary   = util_unconvert_htmlspecialchars($taskinfo['summary']);
 				$startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
 				$enddate   = date(_('Y-m-d H:i'), $taskinfo['end_date']);
+				$status   = $taskinfo['status_name'];
 				echo '<tr>
 						<td><a href="/pm/task.php?func=detailtask&project_task_id='.$taskid.
 						'&group_id='.$groupid.'&group_project_id='.$projectid.'">[T'.$taskid.'] '.$summary.'</a></td>
 						<td>'.$startdate.'</td>
 						<td>'.$enddate.'</td>
+						<td>'.$status.'</td>
 				</tr>';
 			}
-			echo '</table>';
+			echo $GLOBALS['HTML']->listTableBottom();
 			echo '</td></tr>';
 		}
 	}




More information about the Fusionforge-commits mailing list