[evolvis-commits] r18681: [#3191] fix tracker mails not sent when only values cleared

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Oct 4 11:58:04 CEST 2012


Author: mirabilos
Date: 2012-10-04 11:58:03 +0200 (Thu, 04 Oct 2012)
New Revision: 18681

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/Artifact.class.php
Log:
[#3191] fix tracker mails not sent when only values cleared

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/Artifact.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/Artifact.class.php	2012-10-04 09:57:59 UTC (rev 18680)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/Artifact.class.php	2012-10-04 09:58:03 UTC (rev 18681)
@@ -1289,7 +1289,6 @@
 			}
 //
 //	Force each field to have some value if it is a numeric field
-//	text fields will just be purged and skipped
 //
 			if (!array_key_exists($efid, $extra_fields) || $extra_fields[$efid] === '') {
 				if (($type == ARTIFACT_EXTRAFIELDTYPE_SELECT) || ($type == ARTIFACT_EXTRAFIELDTYPE_RADIO)) {
@@ -1297,10 +1296,7 @@
 				} elseif (($type == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) || ($type == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX)) {
 					$extra_fields[$efid]=array('100');
 				} else {
-					$resdel = db_query_params ('DELETE FROM artifact_extra_field_data WHERE artifact_id=$1 AND extra_field_id=$2',
-								   array ($this->getID(),
-									  $efid)) ;
-					continue;
+					$extra_fields[$efid]='';
 				}
 			}
 			//
@@ -1369,6 +1365,15 @@
 
 			}
 
+			if (!$extra_fields[$efid] &&
+			    $type != ARTIFACT_EXTRAFIELDTYPE_SELECT &&
+			    $type != ARTIFACT_EXTRAFIELDTYPE_RADIO &&
+			    $type != ARTIFACT_EXTRAFIELDTYPE_MULTISELECT &&
+			    $type != ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
+				/* text fields are just purged and skipped */
+				continue;
+			}
+
 			//
 			// Some rewrite & consistency checks on the relation type field.
 			//



More information about the evolvis-commits mailing list