[evolvis-commits] r17574: #1906 Fixed. Code was simply missing. Re-added it.

messer at evolvis.org messer at evolvis.org
Thu Sep 29 13:45:40 CEST 2011


Author: messer
Date: 2011-09-29 13:45:40 +0200 (Thu, 29 Sep 2011)
New Revision: 17574

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactQuery.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/query.php
Log:
#1906 Fixed. Code was simply missing. Re-added it.

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactQuery.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactQuery.class.php	2011-09-29 11:20:59 UTC (rev 17573)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactQuery.class.php	2011-09-29 11:45:40 UTC (rev 17574)
@@ -58,6 +58,7 @@
 define('ARTIFACT_QUERY_SUMMARY',9);
 define('ARTIFACT_QUERY_DESCRIPTION',10);
 define('ARTIFACT_QUERY_FOLLOWUPS',11);
+define('ARTIFACT_QUERY_CREATOR',12);
 
 require_once $gfcommon.'tracker/ArtifactType.class.php';
 
@@ -607,7 +608,20 @@
 			return false;
 		return $this->element_array[ARTIFACT_QUERY_ASSIGNEE][0];
 	}
-
+        
+        /**
+	 *	getCreator
+	 *
+	 *	@return	string	Creator ID
+	 */
+	function getCreator() {
+		if (!isset($this->element_array))
+			return false;
+		if (!isset($this->element_array[ARTIFACT_QUERY_CREATOR]))
+			return false;
+		return $this->element_array[ARTIFACT_QUERY_CREATOR][0];
+	}
+        
 	/**
 	 *	getStatus
 	 *

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-09-29 11:20:59 UTC (rev 17573)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-09-29 11:45:40 UTC (rev 17574)
@@ -688,6 +688,30 @@
 		}
 	}
 
+        function creatorBox ($name='submitted_by[]',$checked='xzxz',$show_100=true,$text_100='none',$extra_id='-1',$extra_name='',$multiple=false) {
+		if ($text_100=='none'){
+			$text_100=_('Nobody');
+		}
+		$result = $this->getArtifactCreators();
+		//	this was a bad hack to allow you to mass-update to unassigned, which is ID=100, which 
+		//	conflicted with the "No Change" ID of 100.
+		$ids =& util_result_column_to_array($result,0);
+		$names =& util_result_column_to_array($result,1);
+		if ($extra_id != '-1') {
+			$ids[]=$extra_id;
+			$names[]=$extra_name;
+		}
+			
+		if ($multiple) {
+			if (!is_array($checked)) {
+				$checked = explode(',',$checked);
+			}
+			return html_build_multiple_select_box_from_arrays ($ids,$names,$name,$checked,15,$show_100,$text_100);
+		} else {
+			return html_build_select_box_from_arrays ($ids,$names,$name,$checked,$show_100,$text_100);
+		}
+	}
+        
 	function cannedResponseBox ($name='canned_response',$checked='xzxz') {
 		return html_build_select_box ($this->getCannedResponses(),$name,$checked);
 	}

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/query.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/query.php	2011-09-29 11:20:59 UTC (rev 17573)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/query.php	2011-09-29 11:45:40 UTC (rev 17574)
@@ -177,10 +177,13 @@
 $_description=$aq->getDescription();
 $_followups=$aq->getFollowups();
 $query_type=$aq->getQueryType();
+$_submitted_by = $aq->getCreator();
+
 //
 //	creating a custom technician box which includes "any" and "unassigned"
 $tech_box=$ath->technicianBox ('_assigned_to[]',$_assigned_to,true,'none','-1',false,true);
 
+$creator_box = $ath->creatorBox ('_submitted_by[]',$_submitted_by,true,'none','-1',false,true);
 
 //
 //	custom order by arrays to build a pop-up box
@@ -330,7 +333,8 @@
 		</td>
 	</tr>';
 }
-	echo '<tr>
+	echo '<tr><td><strong>'._('Creator').'</strong><br />'.$creator_box.'</td><td> </td></tr>	
+             <tr>
 		<td><strong>'._('Assignee').':</strong><br />'. $tech_box .'</td>
 		<td valign="top">';
 		if (!$ath->usesCustomStatuses()) {



More information about the evolvis-commits mailing list