[evolvis-commits] r17543: - Functionality from branch to trunk

papel at evolvis.org papel at evolvis.org
Fri Sep 9 16:06:45 CEST 2011


Author: papel
Date: 2011-09-09 16:06:45 +0200 (Fri, 09 Sep 2011)
New Revision: 17543

Modified:
   trunk/gforge_base/evolvisforge/gforge/common/pm/ProjectTasksForUser.class.php
   trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactFile.class.php
   trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactsForUser.class.php
Log:
- Functionality from branch to trunk

Modified: trunk/gforge_base/evolvisforge/gforge/common/pm/ProjectTasksForUser.class.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/pm/ProjectTasksForUser.class.php	2011-09-08 12:22:35 UTC (rev 17542)
+++ trunk/gforge_base/evolvisforge/gforge/common/pm/ProjectTasksForUser.class.php	2011-09-09 14:06:45 UTC (rev 17543)
@@ -84,7 +84,7 @@
 				AND pgl.group_project_id=ptv.group_project_id
 				AND ptv.status_id IN (1,4,5,6)
 				AND pat.assigned_to_id=$1
-			ORDER BY group_name,project_name',
+			ORDER BY group_name,project_name,priority DESC',
 							 array ($this->User->getID())) ;
 	}
 	

Modified: trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactFile.class.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactFile.class.php	2011-09-08 12:22:35 UTC (rev 17542)
+++ trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactFile.class.php	2011-09-09 14:06:45 UTC (rev 17543)
@@ -126,7 +126,6 @@
 		//	data validation
 		//
 		if (!$filename || !$filetype || !$filesize || !$bin_data) {
-			//echo '<p>|'.$filename.'|'.$filetype.'|'.$filesize.'|'.$bin_data.'|';
 			$this->setError(_('ArtifactFile: File name, type, size, and data are required'));
 			return false;
 		}

Modified: trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactsForUser.class.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactsForUser.class.php	2011-09-08 12:22:35 UTC (rev 17542)
+++ trunk/gforge_base/evolvisforge/gforge/common/tracker/ArtifactsForUser.class.php	2011-09-09 14:06:45 UTC (rev 17543)
@@ -77,7 +77,7 @@
 	*	@return	Artifact[]	The array of Artifacts
 	*/
 	function &getAssignedArtifactsByGroup() {
-		return $this->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av WHERE av.assigned_to=$1 AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',
+		return $this->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av WHERE av.assigned_to=$1 AND av.status_id=1 ORDER BY av.group_artifact_id, av.priority DESC',
 							    array($this->User->getID())) ;
 								  
 	}
@@ -95,7 +95,7 @@
 		" INNER JOIN artifact_extra_field_data ad ON (av.artifact_id = ad.artifact_id)" .
 		" INNER JOIN artifact_extra_field_elements ae ON (CAST(ad.field_data as Integer) = ae.element_id)" .
 		" INNER JOIN artifact_extra_field_list al ON (ad.extra_field_id = al.extra_field_id)";
-		$where = " WHERE al.field_name = 'Resolution' AND av.assigned_to=$1 AND at.datatype = 1 AND ae.element_id != 100";
+		$where = " WHERE al.field_name = 'Resolution' AND av.assigned_to=$1 AND at.datatype = 1 AND ae.element_id != 100 ORDER BY av.group_artifact_id, av.priority DESC";
 		//The attribute element_id has the value 100 automatically if not selected.
 		
 		$sqlQuery = $select . $join . $where;
@@ -147,9 +147,10 @@
 			}
 			
 			$where = substr($where, 0, -3);
+			$where .= " ORDER BY av.group_artifact_id, av.priority DESC";
 		} else {
 			array_push($params, $this->User->getID());
-			$where .= " al.field_name = 'Resolution' AND av.assigned_to=$1 AND at.datatype = 1 AND ae.element_id != 100";# ORDER BY av.priority DESC"; Add to sort by priority		
+			$where .= " al.field_name = 'Resolution' AND av.assigned_to=$1 AND at.datatype = 1 AND ae.element_id != 100 ORDER BY av.group_artifact_id, av.priority DESC";		
 		}
 		//The attribute element_id has the value 100 automatically if not selected.
 		
@@ -168,6 +169,7 @@
 		$select = "SELECT av.artifact_id, av.priority, av.summary, av.group_artifact_id FROM artifact_vw av";
 		$join = " INNER JOIN artifact_group_list at ON (av.group_artifact_id = at.group_artifact_id)";
 		$where = " WHERE av.assigned_to=$1 AND av.status_id=1 AND at.datatype != 1";
+		$where .= " ORDER BY av.group_artifact_id, av.priority DESC";
 		$sqlQuery = $select . $join . $where;
 
 		return $this->getArtifactsFromSQLwithParams($sqlQuery, array($this->User->getID()));
@@ -179,7 +181,7 @@
 	*	@return Artifact[] The array of Artifacts
 	*/
 	function &getSubmittedArtifactsByGroup() {
-		return $this->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av WHERE av.submitted_by=$1 AND av.status_id=1 ORDER BY av.group_artifact_id, av.artifact_id DESC',
+		return $this->getArtifactsFromSQLwithParams('SELECT * FROM artifact_vw av WHERE av.submitted_by=$1 AND av.status_id=1 ORDER BY av.group_artifact_id, av.priority DESC',
 							    array($this->User->getID())) ;
 	}
 }



More information about the evolvis-commits mailing list