[evolvis-commits] r18691: [#3259] linked bugs to tasks; sort linked items

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Oct 4 17:59:51 CEST 2012


Author: mirabilos
Date: 2012-10-04 17:59:51 +0200 (Thu, 04 Oct 2012)
New Revision: 18691

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/www/pm/t_lookup.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
Log:
[#3259] linked bugs to tasks; sort linked items

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/pm/t_lookup.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/pm/t_lookup.php	2012-10-04 15:59:48 UTC (rev 18690)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/pm/t_lookup.php	2012-10-04 15:59:51 UTC (rev 18691)
@@ -2,7 +2,7 @@
 /**
  * Task UUID implementation for FusionForge
  *
- * Copyright © 2010
+ * Copyright © 2010, 2012
  *	Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
  * All rights reserved.
  *
@@ -87,6 +87,7 @@
 
 if ($showall) {
 	$tinfo = getAllFromProjectTask($tid);
+	require_once $gfcommon.'pm/ProjectTask.class.php';
 }
 
 $tinfo['public'] = $ispublic;
@@ -94,6 +95,18 @@
 $tinfo['forge_name'] = forge_get_config ('forge_name') ;
 $tinfo['_permalink'] = util_make_url('/pm/t_follow.php/' . $tid);
 
+if ($showall && ($pth = projecttask_get_object($tid))) {
+	$tinfo['_linked_tracker_items'] = array();
+	if (($res = $pth->getRelatedArtifacts()) &&
+	    ($rows = db_numrows($res)) >= 1) {
+		for ($i = 0; $i < $rows; ++$i) {
+			$tinfo['_linked_tracker_items'][] =
+			    (int)db_result($res, $i, 'artifact_id');
+		}
+		sort($tinfo['_linked_tracker_items'], SORT_NUMERIC);
+	}
+}
+
 sysdebug_off("Content-type: " . $asformat);
 echo minijson_encode($tinfo, $jsonindent) . "\n";
 exit;

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php	2012-10-04 15:59:48 UTC (rev 18690)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/t_lookup.php	2012-10-04 15:59:51 UTC (rev 18691)
@@ -161,6 +161,7 @@
 			$xinfo['_related_tasks'][] =
 			    (int)$taskinfo['project_task_id'];
 		}
+		sort($xinfo['_related_tasks'], SORT_NUMERIC);
 	}
 }
 



More information about the evolvis-commits mailing list