[evolvis-commits] r18716: PM: fix sorting by (multiple) assignees

mirabilos at evolvis.org mirabilos at evolvis.org
Mon Oct 8 14:43:25 CEST 2012


Author: mirabilos
Date: 2012-10-08 14:43:24 +0200 (Mon, 08 Oct 2012)
New Revision: 18716

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/pm/ProjectTask.class.php
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/www/pm/browse_task.php
Log:
PM: fix sorting by (multiple) assignees

• sort by unixname, not by uid (and leave sorting to the DB)
• use unixname for content attribute

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/pm/ProjectTask.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/pm/ProjectTask.class.php	2012-10-08 12:43:20 UTC (rev 18715)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/pm/ProjectTask.class.php	2012-10-08 12:43:24 UTC (rev 18716)
@@ -935,14 +935,15 @@
 		if (!$this->assignedto) {
 			$this->assignedto =& util_result_column_to_array(db_query_params(
 			    'SELECT assigned_to_id
-				FROM project_assigned_to
+				FROM project_assigned_to, users
 				WHERE project_task_id=$1' .
-			    ($rawres ? '' : ' AND assigned_to_id <> 100'),
+			    ($rawres ? '' : ' AND assigned_to_id <> 100') .
+				' AND users.user_id = project_assigned_to.assigned_to_id
+				ORDER BY users.user_name',
 			    array($this->getID())));
 			if (!$this->assignedto) {
 				$this->assignedto = array(100);
 			}
-			sort($this->assignedto, SORT_NUMERIC);
 		}
 		return $this->assignedto;
 	}

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-10-08 12:43:20 UTC (rev 18715)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-10-08 12:43:24 UTC (rev 18716)
@@ -7,7 +7,7 @@
   * Use Gravatar in more places
   * Repair ECMAscript used to handle multiple-assignment checkboxen
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Mon, 08 Oct 2012 14:15:12 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Mon, 08 Oct 2012 14:32:43 +0200
 
 fusionforge (1:5.1.1+evolvis73) unstable; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/pm/browse_task.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/pm/browse_task.php	2012-10-08 12:43:20 UTC (rev 18715)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/pm/browse_task.php	2012-10-08 12:43:24 UTC (rev 18716)
@@ -522,7 +522,10 @@
 				'class' => array(
 					'separateRowsForPrinting',
 				    ),
-				'content' => implode(':', $xt),
+				'content' => implode(':',
+				    array_map(function($v) {
+					return $v->getUnixName();
+				    }, user_get_objects($xt))),
 			    ), $pg->renderAssigneeList($xt));
 		}
 		if ($display_col['priority'])



More information about the evolvis-commits mailing list