[evolvis-commits] r18429: evolvis-template-group pending merges:↵ Thorsten Glaser 2012-05-24 default to sending out all info for PM and forum, too↵ Thorsten Glaser 2012-05-24 replaceTemplateStrings and properly unescape strings for PM and forum...↵ Thorsten Glaser 2012-05-24 let all trackers default to sending out their mails↵ Thorsten Glaser 2012-05-24 run eMail address, submit/browse instructions through replaceTemplate...↵ Thorsten Glaser 2012-05-24 fix encoding for name/description/{submit,browse}_instructions↵ Thorsten Glaser 2012-05-24 email_all is a boolean field, so use 0/1 not 0/$passedvalue

mirabilos at evolvis.org mirabilos at evolvis.org
Thu May 24 10:35:05 CEST 2012


Author: mirabilos
Date: 2012-05-24 10:35:04 +0200 (Thu, 24 May 2012)
New Revision: 18429

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/artifact_type_definitions.php
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/utils/fixscripts/populate_template_project.php
Log:
evolvis-template-group pending merges:
  Thorsten Glaser 2012-05-24 default to sending out all info for PM and forum, too
    Thorsten Glaser 2012-05-24 replaceTemplateStrings and properly unescape strings for PM and forum...
    Thorsten Glaser 2012-05-24 let all trackers default to sending out their mails
    Thorsten Glaser 2012-05-24 run eMail address, submit/browse instructions through replaceTemplate...
    Thorsten Glaser 2012-05-24 fix encoding for name/description/{submit,browse}_instructions
    Thorsten Glaser 2012-05-24 email_all is a boolean field, so use 0/1 not 0/$passedvalue

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php	2012-05-23 16:40:34 UTC (rev 18428)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/Group.class.php	2012-05-24 08:35:04 UTC (rev 18429)
@@ -2530,7 +2530,17 @@
 					$oldatf = new ArtifactTypeFactory ($template) ;
 					foreach ($oldatf->getArtifactTypes() as $o) {
 						$t = new ArtifactType ($this) ;
-						$t->create ($this->replaceTemplateStrings($o->getName()),$this->replaceTemplateStrings($o->getDescription()),$o->isPublic(),$o->allowsAnon(),$o->emailAll(),$o->getEmailAddress(),$o->getDuePeriod()/86400,0,$o->getSubmitInstructions(),$o->getBrowseInstructions()) ;
+						$t->create($this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getName())),
+						    $this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getDescription())),
+						    $o->isPublic(),
+						    $o->allowsAnon(),
+						    $o->emailAll(),
+						    $this->replaceTemplateStrings($o->getEmailAddress()),
+						    $o->getDuePeriod()/86400,
+						    /* unused */ 0,
+						    $this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getSubmitInstructions())),
+						    $this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getBrowseInstructions()))
+						    );
 						$id_mappings['tracker'][$o->getID()] = $t->getID() ;
 						$t->cloneFieldsFrom($template, $o->getID());
 					}
@@ -2543,7 +2553,11 @@
 					$oldpgf = new ProjectGroupFactory ($template) ;
 					foreach ($oldpgf->getProjectGroups() as $o) {
 						$pg = new ProjectGroup ($this) ;
-						$pg->create ($this->replaceTemplateStrings($o->getName()),$this->replaceTemplateStrings($o->getDescription()),$o->isPublic(),$o->getSendAllPostsTo()) ;
+						$pg->create($this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getName())),
+						    $this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getDescription())),
+						    $o->isPublic(),
+						    $this->replaceTemplateStrings($o->getSendAllPostsTo())
+						    );
 						$id_mappings['pm'][$o->getID()] = $pg->getID() ;
 					}
 				}
@@ -2555,7 +2569,15 @@
 					$oldff = new ForumFactory ($template) ;
 					foreach ($oldff->getForums() as $o) {
 						$f = new Forum ($this) ;
-						$f->create ($this->replaceTemplateStrings($o->getName()),$this->replaceTemplateStrings($o->getDescription()),$o->isPublic(),$o->getSendAllPostsTo(),1,$o->allowAnonymous(),$o->getModerationLevel()) ;
+						$f->create(
+						    $this->replaceTemplateStrings($o->getName()),
+						    $this->replaceTemplateStrings(util_unconvert_htmlspecialchars($o->getDescription())),
+						    $o->isPublic(),
+						    $this->replaceTemplateStrings($o->getSendAllPostsTo()),
+						    1,
+						    $o->allowAnonymous(),
+						    $o->getModerationLevel()
+						    );
 						$id_mappings['forum'][$o->getID()] = $f->getID() ;
 					}
 				}

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php	2012-05-23 16:40:34 UTC (rev 18428)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactType.class.php	2012-05-24 08:35:04 UTC (rev 18429)
@@ -6,7 +6,7 @@
  * Copyright 2002-2004, GForge, LLC
  * Copyright 2009, Roland Mas
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright © 2011
+ * Copyright © 2011, 2012
  *	Thorsten Glaser <t.glaser at tarent.de>
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -189,7 +189,7 @@
 	 *	@param	bool	(1) true (0) false - whether to email on all updates.
 	 *	@param	string	The address to send new entries and updates to.
 	 *	@param	int	Days before this item is considered overdue.
-	 *	@param	bool	(1) trye (0) false - whether the resolution box should be shown.
+	 *	@param	unused
 	 *	@param	string	Free-form string that project admins can place on the submit page.
 	 *	@param	string	Free-form string that project admins can place on the browse page.
 	 *	@param	int	(1) bug tracker, (2) Support Tracker, (3) Patch Tracker, (4) features (5) Funktionsreferenz (0) other.
@@ -217,10 +217,9 @@
 			}
 		}
 
-		$use_resolution = ((!$use_resolution) ? 0 : $use_resolution);
 		$is_public = ((!$is_public) ? 0 : $is_public);
 		$allow_anon = ((!$allow_anon) ? 0 : $allow_anon);
-		$email_all = ((!$email_all) ? 0 : $email_all);
+		$email_all = ((!$email_all) ? 0 : 1);
 
 		db_begin();
 
@@ -938,7 +937,7 @@
 	 *  @param	string	The address to send new entries and updates to.
 	 *  @param	int		Days before this item is considered overdue.
 	 *  @param	int		Days before stale items time out.
-	 *  @param	bool	(1) true (0) false - whether the resolution box should be shown.
+	 *  @param	unused
 	 *  @param	string	Free-form string that project admins can place on the submit page.
 	 *  @param	string	Free-form string that project admins can place on the browse page.
 	 *  @param	bool	(1) true (0) false - whether non-logged-in users can submit.
@@ -982,8 +981,7 @@
 		}
 
 		$allow_anon = ((!$allow_anon) ? 0 : $allow_anon);
-		$email_all = ((!$email_all) ? 0 : $email_all);
-		$use_resolution = ((!$use_resolution) ? 0 : $use_resolution);
+		$email_all = ((!$email_all) ? 0 : 1);
 
 		$res = db_query_params  ('UPDATE artifact_group_list SET
 			name=$1,
@@ -1061,5 +1059,3 @@
 // mode: php
 // c-file-style: "bsd"
 // End:
-
-?>

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/artifact_type_definitions.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/artifact_type_definitions.php	2012-05-23 16:40:34 UTC (rev 18428)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/artifact_type_definitions.php	2012-05-24 08:35:04 UTC (rev 18429)
@@ -214,9 +214,9 @@
 //
 
 /*
-NAME DESCRIPTION, $is_public,$allow_anon,$email_all,$email_address,
-$due_period,$use_resolution,$submit_instructions,$browse_instructions,
-$datatype=0,$fields,$renderer=""
+NAME, DESCRIPTION, $is_public, $allow_anon, $email_all, $email_address,
+$due_period, (unused)0, $submit_instructions, $browse_instructions,
+$datatype=0, $fields, $renderer=""
 */
 
 $evolvis_fields = array(
@@ -231,14 +231,14 @@
 	$relitem,
 );
 
-$trackers[]=array('Bugs','Bug Tracking System',1,0,'','',30,0,'','',1, $evolvis_fields);
+$trackers[]=array('Bugs','Bug Tracking System',1,0,1,'UNIXNAME-discuss@' . forge_get_config('lists_host'),30,0,'','',1, $evolvis_fields);
 
-$trackers[]=array('Support','Tech Support Tracking System',1,0,'','',30,0,'','',2, $evolvis_fields);
+$trackers[]=array('Support','Tech Support Tracking System',1,0,1,'UNIXNAME-discuss@' . forge_get_config('lists_host'),30,0,'','',2, $evolvis_fields);
 
-$trackers[]=array('Patches','Patch Tracking System',1,0,'','',30,0,'','',3,
+$trackers[]=array('Patches','Patch Tracking System',1,0,1,'UNIXNAME-discuss@' . forge_get_config('lists_host'),30,0,'','',3,
     array($component, $verfound, $verfixed, $resolution, $severity, $url, $relitem));
 
-$trackers[]=array('Feature Requests','Feature Request Tracking System',1,0,'','',30,0,'','',4,
+$trackers[]=array('Feature Requests','Feature Request Tracking System',1,0,1,'UNIXNAME-discuss@' . forge_get_config('lists_host'),30,0,'','',4,
     array($url, $component, $browser, $os, $relitem));
 
 
@@ -246,7 +246,7 @@
 
 $trackers[] = array('Funktionsreferenz',
     'Funktionsreferenz (vom PM aus Kundenanforderungen erstellt)',
-    1, 0, 0, '', 30, 0, '', '', 5, array(
+    1, 0, 1, 'UNIXNAME-discuss@' . forge_get_config('lists_host'), 30, 0, '', '', 5, array(
 	$url,
 	array('Kategorie/Komponente', ARTIFACT_EXTRAFIELDTYPE_SELECT, 0, 0, 0, array()),
 	array('Meilenstein', ARTIFACT_EXTRAFIELDTYPE_SELECT, 0, 0, 0, array()),

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-23 16:40:34 UTC (rev 18428)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2012-05-24 08:35:04 UTC (rev 18429)
@@ -27,8 +27,13 @@
   * Make ZIP file creation more reliable; plant upper limits on size
   * Adjust default bugtracker status mapping
     ‣‣‣ BEFORE UPLOADING TRIGGER CREATION OF A NEW TEMPLATE GROUP ⇐⇐⇐
+  * When applying a template project, replace strings in the submission
+    eMail address (Tracker, Tasks, Forum) and the submit and browse
+    instructions (Tracker) as well, and correctly unescape all strings
+  * By default, all changes in Tracker, Tasks and Forum are now sent
+    to the UNIXNAME-discuss@ mailing list
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Wed, 23 May 2012 17:15:50 +0200
+ -- Thorsten Glaser <t.glaser at tarent.de>  Thu, 24 May 2012 10:01:00 +0200
 
 fusionforge (1:5.1.1+evolvis60) unstable; urgency=high
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/utils/fixscripts/populate_template_project.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/utils/fixscripts/populate_template_project.php	2012-05-23 16:40:34 UTC (rev 18428)
+++ trunk/gforge_base/evolvisforge-5.1/src/utils/fixscripts/populate_template_project.php	2012-05-24 08:35:04 UTC (rev 18429)
@@ -100,21 +100,29 @@
 
 	if (forge_get_config ('use_forum')) {
 		$f = new Forum($project);
-		if (!$f->create(_('Open-Discussion'),_('General Discussion'),1,'',1,0)) {
+		if (!$f->create(_('Open-Discussion'),
+		    _('General Discussion'), 1,
+		    'UNIXNAME-discuss@' . forge_get_config('lists_host'),
+		    1, 0)) {
 			$project->setError(sprintf (_('F%d: %s'), 1, $f->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();
 			return false;
 		}
 		$f = new Forum($project);
-		if (!$f->create(_('Help'),_('Get Public Help'),1,'',1,0)) {
+		if (!$f->create(_('Help'), _('Get Public Help'), 1,
+		    'UNIXNAME-discuss@' . forge_get_config('lists_host'),
+		    1, 0)) {
 			$project->setError(sprintf (_('F%d: %s'), 2, $f->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();
 			return false;
 		}
 		$f = new Forum($project);
-		if (!$f->create(_('Developers-Discussion'),_('Project Developer Discussion'),0,'',1,0)) {
+		if (!$f->create(_('Developers-Discussion'),
+		    _('Project Developer Discussion'), 0,
+		    'UNIXNAME-discuss@' . forge_get_config('lists_host'),
+		    1, 0)) {
 			$project->setError(sprintf (_('F%d: %s'), 3, $f->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();
@@ -144,14 +152,17 @@
 
 	if (forge_get_config ('use_pm')) {
 		$pg = new ProjectGroup($project);
-		if (!$pg->create(_('To Do'),_('Things We Have To Do'),1)) {
+		if (!$pg->create(_('To Do'), _('Things We Have To Do'), 1,
+		    'UNIXNAME-discuss@' . forge_get_config('lists_host'))) {
 			$project->setError(sprintf(_('PG%d: %s'),1,$pg->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();
 			return false;
 		}
 		$pg = new ProjectGroup($project);
-		if (!$pg->create(_('Next Release'),_('Items For Our Next Release'),1)) {
+		if (!$pg->create(_('Next Release'),
+		    _('Items For Our Next Release'), 1,
+		    'UNIXNAME-discuss@' . forge_get_config('lists_host'))) {
 			$project->setError(sprintf(_('PG%d: %s'),2,$pg->getErrorMessage()));
 			db_rollback();
 			setup_gettext_from_context();



More information about the evolvis-commits mailing list