View Issue Details

IDProjectCategoryView StatusLast Update
0004278mantisbtemailpublic2009-09-04 11:07
ReporterDGtlRift Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionfixed 
Product Version0.19.0a2 
Summary0004278: Summary email vs detailed email
Description

The messages that come from mantis are fairly detailed, it would be nice to have a user definabled level of detail that can be set by each user.

If the user prefers a light version of the email it will just email the details of the last note updated and not the entire thread of activity on a bug.

Tagspatch
Attached Files
settings.gif (74,469 bytes)   
settings.gif (74,469 bytes)   
brief.gif (21,646 bytes)   
brief.gif (21,646 bytes)   
diff.gif (19,148 bytes)   
diff.gif (19,148 bytes)   
mantisbt.4278.diffemail.txt (28,532 bytes)   
Index: account_prefs_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/account_prefs_inc.php,v
retrieving revision 1.30
diff -u -r1.30 account_prefs_inc.php
--- account_prefs_inc.php	17 Aug 2004 12:08:37 -0000	1.30
+++ account_prefs_inc.php	5 Oct 2004 15:13:57 -0000
@@ -125,7 +125,11 @@
 		<?php echo lang_get( 'email_on_new' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_new" <?php check_checked( $t_pref->email_on_new, ON ); ?> />
+		<input type="radio" name="email_on_new" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_new, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+		<input type="radio" name="email_on_new" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_new, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_new" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_new, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+		<input type="radio" name="email_on_new" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_new, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
+
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_new_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -139,7 +143,11 @@
 		<?php echo lang_get( 'email_on_assigned' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_assigned" <?php check_checked( $t_pref->email_on_assigned, ON ); ?> />
+		<input type="radio" name="email_on_assigned" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_assigned, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_assigned" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_assigned, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_assigned" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_assigned, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_assigned" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_assigned, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
+
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_assigned_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -153,7 +161,11 @@
 		<?php echo lang_get( 'email_on_feedback' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_feedback" <?php check_checked( $t_pref->email_on_feedback, ON ); ?> />
+                <input type="radio" name="email_on_feedback" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_feedback, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_feedback" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_feedback, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_feedback" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_feedback, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_feedback" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_feedback, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
+
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_feedback_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -167,7 +179,11 @@
 		<?php echo lang_get( 'email_on_resolved' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_resolved" <?php check_checked( $t_pref->email_on_resolved, ON ); ?> />
+                <input type="radio" name="email_on_resolved" value="<?php echo EMAIL_NOTICE_LONG?>" <?php check_checked( $t_pref->email_on_resolved, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_resolved" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_resolved, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_resolved" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_resolved, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_resolved" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_resolved, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
+
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_resolved_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -181,7 +197,10 @@
 		<?php echo lang_get( 'email_on_closed' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_closed" <?php check_checked( $t_pref->email_on_closed, ON ); ?> />
+                <input type="radio" name="email_on_closed" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_closed, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_closed" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_closed, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_closed" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_closed, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_closed" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_closed, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_closed_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -195,7 +214,10 @@
 		<?php echo lang_get( 'email_on_reopened' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_reopened" <?php check_checked( $t_pref->email_on_reopened, ON ); ?> />
+                <input type="radio" name="email_on_reopened" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_reopened, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_reopened" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_reopened, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_reopened" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_reopened, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_reopened" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_reopened, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_reopened_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -209,7 +231,10 @@
 		<?php echo lang_get( 'email_on_bugnote_added' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_bugnote" <?php check_checked( $t_pref->email_on_bugnote, ON ); ?> />
+                <input type="radio" name="email_on_bugnote" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_bugnote, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_bugnote" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_bugnote, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_bugnote" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_bugnote, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_bugnote" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_bugnote, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_bugnote_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -223,7 +248,10 @@
 		<?php echo lang_get( 'email_on_status_change' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_status" <?php check_checked( $t_pref->email_on_status, ON ); ?> />
+                <input type="radio" name="email_on_status" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_status, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_status" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_status, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_status" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_status, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_status" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_status, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_status_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
@@ -237,7 +265,10 @@
 		<?php echo lang_get( 'email_on_priority_change' ) ?>
 	</td>
 	<td>
-		<input type="checkbox" name="email_on_priority" <?php check_checked( $t_pref->email_on_priority , ON); ?> />
+                <input type="radio" name="email_on_priority" value="<?php echo EMAIL_NOTICE_LONG ?>" <?php check_checked( $t_pref->email_on_priority, EMAIL_NOTICE_LONG ); ?> /><?php echo lang_get( 'email_notice_long' ) ?>
+                <input type="radio" name="email_on_priority" value="<?php echo EMAIL_NOTICE_BRIEF ?>" <?php check_checked( $t_pref->email_on_priority, EMAIL_NOTICE_BRIEF ); ?> /><?php echo lang_get( 'email_notice_brief' ) ?>
+		<input type="radio" name="email_on_priority" value="<?php echo EMAIL_NOTICE_DIFF ?>" <?php check_checked( $t_pref->email_on_priority, EMAIL_NOTICE_DIFF ); ?> /><?php echo lang_get( 'email_notice_diff' ) ?>
+                <input type="radio" name="email_on_priority" value="<?php echo EMAIL_NOTICE_OFF ?>" <?php check_checked( $t_pref->email_on_priority, EMAIL_NOTICE_OFF ); ?> /><?php echo lang_get( 'email_notice_off' ) ?><BR>
 		<?php echo lang_get( 'with_minimum_severity' ) ?>
 		<select name="email_on_priority_minimum_severity">
 			<option value="any"><?php echo lang_get( 'any' ) ?></option>
Index: account_prefs_update.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/account_prefs_update.php,v
retrieving revision 1.34
diff -u -r1.34 account_prefs_update.php
--- account_prefs_update.php	8 Aug 2004 11:39:00 -0000	1.34
+++ account_prefs_update.php	5 Oct 2004 15:13:57 -0000
@@ -48,15 +48,15 @@
 	$t_prefs->advanced_report	= gpc_get_bool( 'advanced_report' );
 	$t_prefs->advanced_view		= gpc_get_bool( 'advanced_view' );
 	$t_prefs->advanced_update	= gpc_get_bool( 'advanced_update' );
-	$t_prefs->email_on_new		= gpc_get_bool( 'email_on_new' );
-	$t_prefs->email_on_assigned	= gpc_get_bool( 'email_on_assigned' );
-	$t_prefs->email_on_feedback	= gpc_get_bool( 'email_on_feedback' );
-	$t_prefs->email_on_resolved	= gpc_get_bool( 'email_on_resolved' );
-	$t_prefs->email_on_closed	= gpc_get_bool( 'email_on_closed' );
-	$t_prefs->email_on_reopened	= gpc_get_bool( 'email_on_reopened' );
-	$t_prefs->email_on_bugnote	= gpc_get_bool( 'email_on_bugnote' );
-	$t_prefs->email_on_status	= gpc_get_bool( 'email_on_status' );
-	$t_prefs->email_on_priority	= gpc_get_bool( 'email_on_priority' );
+	$t_prefs->email_on_new		= gpc_get_int( 'email_on_new' );
+	$t_prefs->email_on_assigned	= gpc_get_int( 'email_on_assigned' );
+	$t_prefs->email_on_feedback	= gpc_get_int( 'email_on_feedback' );
+	$t_prefs->email_on_resolved	= gpc_get_int( 'email_on_resolved' );
+	$t_prefs->email_on_closed	= gpc_get_int( 'email_on_closed' );
+	$t_prefs->email_on_reopened	= gpc_get_int( 'email_on_reopened' );
+	$t_prefs->email_on_bugnote	= gpc_get_int( 'email_on_bugnote' );
+	$t_prefs->email_on_status	= gpc_get_int( 'email_on_status' );
+	$t_prefs->email_on_priority	= gpc_get_int( 'email_on_priority' );
 	$t_prefs->email_on_new_minimum_severity			= gpc_get_int( 'email_on_new_minimum_severity' );
 	$t_prefs->email_on_assigned_minimum_severity	= gpc_get_int( 'email_on_assigned_minimum_severity' );
 	$t_prefs->email_on_feedback_minimum_severity	= gpc_get_int( 'email_on_feedback_minimum_severity' );
Index: core/constant_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/constant_inc.php,v
retrieving revision 1.31
diff -u -r1.31 constant_inc.php
--- core/constant_inc.php	28 Sep 2004 14:09:39 -0000	1.31
+++ core/constant_inc.php	5 Oct 2004 15:13:58 -0000
@@ -14,10 +14,10 @@
 	# --- constants -------------------
 
 	# magic numbers
-	define( 'ON',	1 );
-	define( 'OFF',	0 );
-	define( 'AUTO', 3 );
-
+	define( 'ON',	 1 );
+	define( 'OFF',	 0 );
+	define( 'AUTO',  3 );
+	
 
 	# error types
 	define( 'ERROR',	E_USER_ERROR );
@@ -275,6 +275,12 @@
 	# Flags for settings E-mail categories
 	define( 'EMAIL_CATEGORY_PROJECT_CATEGORY',	1);
 
+	# Flags for setting E-Mail Format in My Account - Prefrences
+	define( 'EMAIL_NOTICE_OFF',	0 );
+	define( 'EMAIL_NOTICE_LONG',	1 );
+	define( 'EMAIL_NOTICE_BRIEF',	2 );
+	define( 'EMAIL_NOTICE_DIFF',	3 );
+
 	# Custom Field types
 	define( 'CUSTOM_FIELD_TYPE_STRING',		0 );
 	define( 'CUSTOM_FIELD_TYPE_NUMERIC',	1 );
Index: core/email_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v
retrieving revision 1.101
diff -u -r1.101 email_api.php
--- core/email_api.php	26 Sep 2004 02:05:14 -0000	1.101
+++ core/email_api.php	5 Oct 2004 15:13:59 -0000
@@ -177,13 +177,13 @@
 		# Reporter
 		if ( ON == email_notify_flag( $p_notify_type, 'reporter' ) ) {
 			$t_reporter_id = bug_get_field( $p_bug_id, 'reporter_id' );
-			$t_recipients[$t_reporter_id] = true;
+			$t_recipients[$t_reporter_id] = user_pref_get_pref( $t_reporter_id, 'email_on_' . $p_notify_type );
 		}
 
 		# Handler
 		if ( ON == email_notify_flag( $p_notify_type, 'handler' )) {
 			$t_handler_id = bug_get_field( $p_bug_id, 'handler_id' );
-			$t_recipients[$t_handler_id] = true;
+			$t_recipients[$t_handler_id] = user_pref_get_pref( $t_reporter_id, 'email_on_' . $p_notify_type );
 		}
 
 		$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
@@ -199,7 +199,7 @@
 			$count = db_num_rows( $result );
 			for ( $i=0 ; $i < $count ; $i++ ) {
 				$t_user_id = db_result( $result, $i );
-				$t_recipients[$t_user_id] = true;
+				$t_recipients[$t_user_id] = user_pref_get_pref( $t_user_id, 'email_on_' . $p_notify_type );
 			}
 		}
 
@@ -215,7 +215,7 @@
 			for( $i=0 ; $i < $count ; $i++ ) {
 				$t_user_id = db_result( $result, $i );
 				# @@@ (thraxisp) check that user can see bugnotes here
-				$t_recipients[$t_user_id] = true;
+				$t_recipients[$t_user_id] = user_pref_get_pref( $t_user_id, 'email_on_' . $p_notify_type );
 			}
 		}
 
@@ -227,7 +227,7 @@
 		foreach( $t_threshold_users as $t_user ) {
 			if ( $t_user['access_level'] <= $t_threshold_max ) {
 				if ( !$t_bug_is_private || $t_user['access_level'] >= config_get( 'private_bug_threshold' ) ) {
-					$t_recipients[$t_user['id']] = true;
+					$t_recipients[$t_user['id']] = user_pref_get_pref( $t_user['id'], 'email_on_' . $p_notify_type );
 				}
 			}
 		}
@@ -285,7 +285,11 @@
 			} else {
 				# @@@ we could check the emails for validity again but I think
 				#   it would be too slow
-				$t_recipients[$t_id] = $t_email;
+				$t_tmp = array();
+				
+				$t_tmp['email'] = $t_email;
+				$t_tmp['notice_format'] = $t_recipients[$t_id];
+				$t_recipients[$t_id] = $t_tmp;
 			}
 		}
 
@@ -403,9 +407,9 @@
 
 			if ( is_array( $t_recipients ) ) {
 				# send email to every recipient
-				foreach ( $t_recipients as $t_user_id => $t_user_email ) {
-					$t_visible_bug_data = email_build_visible_bug_data( $t_user_id, $p_bug_id, $p_message_id );
-					$t_ok = email_bug_info_to_one_user( $t_visible_bug_data, $p_message_id, $t_project_id, $t_user_id ) && $t_ok;
+				foreach ( $t_recipients as $t_user_id => $t_user_info ) {
+					$t_visible_bug_data = email_build_visible_bug_data( $t_user_id, $t_user_info['notice_format'], $p_bug_id, $p_message_id );
+					$t_ok = email_bug_info_to_one_user( $t_visible_bug_data, $p_message_id, $t_project_id, $t_user_id, $t_user_info['notice_format'] ) && $t_ok;
 				}
 			}
 		}
@@ -755,7 +759,7 @@
 	# --------------------
 	# Send bug info to given user
 	# return true on success
-	function email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_project_id, $p_user_id ) {
+	function email_bug_info_to_one_user( $p_visible_bug_data, $p_message_id, $p_project_id, $p_user_id, $p_email_notice_format ) {
 
 		$t_user_email = user_get_email( $p_user_id );
 
@@ -779,13 +783,13 @@
 		if ( ( $t_message !== null ) && ( !is_blank( $t_message ) ) ) {
 			$t_message .= "\n";
 		}
-
-		$t_message .= email_format_bug_message(  $p_visible_bug_data );
+		
+		$t_message .= email_format_bug_message( $p_visible_bug_data, $p_email_notice_format );
 
 		# send mail
 		# PRINT '<br />email_bug_info::Sending email to :'.$t_user_email;
 		$t_ok = email_send( $t_user_email, $t_subject, $t_message, '', $p_visible_bug_data['set_category'], false );
-
+		
 		lang_pop();
 
 		return $t_ok;
@@ -793,7 +797,7 @@
 
 	# --------------------
 	# Build the bug info part of the message
-	function email_format_bug_message( $p_visible_bug_data ) {
+	function email_format_bug_message( $p_visible_bug_data, $p_email_notice_format ) {
 
 		$t_normal_date_format = config_get( 'normal_date_format' );
 		$t_complete_date_format = config_get( 'complete_date_format' );
@@ -818,78 +822,79 @@
 			$t_message .= '<' . $p_visible_bug_data['email_bug_view_url'] . "> \n";
 			$t_message .= $t_email_separator1."\n";
 		}
+		if ( EMAIL_NOTICE_DIFF != $p_email_notice_format ) {
 
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_reporter' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_handler' );
-		$t_message .= $t_email_separator1."\n";
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_project' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_bug' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_category' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_reproducibility' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_severity' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_priority' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_status' );
-
-		# custom fields formatting
-		foreach( $p_visible_bug_data['custom_fields'] as $t_custom_field_name => $t_custom_field_data ) {
-			$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
-			$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
-			$t_message .= "\n";
-		} # end foreach custom field
-
-		if ( config_get( 'bug_resolved_status_threshold' ) <= $t_status ) {
-			$p_visible_bug_data['email_resolution'] = get_enum_element( 'resolution', $p_visible_bug_data['email_resolution'] );
-			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_resolution' );
-			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_duplicate' );
-			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_fixed_in_version' );
-		}
-		$t_message .= $t_email_separator1."\n";
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_reporter' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_handler' );
+			$t_message .= $t_email_separator1."\n";
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_project' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_bug' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_category' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_reproducibility' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_severity' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_priority' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_status' );
+
+			# custom fields formatting
+			foreach( $p_visible_bug_data['custom_fields'] as $t_custom_field_name => $t_custom_field_data ) {
+				$t_message .= str_pad( lang_get_defaulted( $t_custom_field_name, null ) . ': ', $t_email_padding_length, ' ', STR_PAD_RIGHT );
+				$t_message .= string_custom_field_value_for_email ( $t_custom_field_data['value'], $t_custom_field_data['type'] );
+				$t_message .= "\n";
+			} # end foreach custom field
+
+			if ( config_get( 'bug_resolved_status_threshold' ) <= $t_status ) {
+				$p_visible_bug_data['email_resolution'] = get_enum_element( 'resolution', $p_visible_bug_data['email_resolution'] );
+				$t_message .= email_format_attribute( $p_visible_bug_data, 'email_resolution' );
+				$t_message .= email_format_attribute( $p_visible_bug_data, 'email_duplicate' );
+				$t_message .= email_format_attribute( $p_visible_bug_data, 'email_fixed_in_version' );
+			}
+			$t_message .= $t_email_separator1."\n";
 
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_date_submitted' );
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_last_modified' );
-		$t_message .= $t_email_separator1."\n";
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_date_submitted' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_last_modified' );
+			$t_message .= $t_email_separator1."\n";
 
-		$t_message .= email_format_attribute( $p_visible_bug_data, 'email_summary' );
+			$t_message .= email_format_attribute( $p_visible_bug_data, 'email_summary' );
 
-		$t_message .= lang_get( 'email_description' ) . ": \n".wordwrap( $p_visible_bug_data['email_description'] )."\n";
+			$t_message .= lang_get( 'email_description' ) . ": \n".wordwrap( $p_visible_bug_data['email_description'] )."\n";
 
-		# MASC RELATIONSHIP
-		if ( ON == config_get( 'enable_relationship' ) ) {
-			if (isset( $p_visible_bug_data['relations'] )) {
-				$t_message .= $p_visible_bug_data['relations'];
+			# MASC RELATIONSHIP
+			if ( ON == config_get( 'enable_relationship' ) ) {
+				if (isset( $p_visible_bug_data['relations'] )) {
+					$t_message .= $p_visible_bug_data['relations'];
+				}
 			}
-		}
-		# MASC RELATIONSHIP
-
-		# Sponsorship
-		if ( isset( $p_visible_bug_data['sponsorship_total'] ) && ( $p_visible_bug_data['sponsorship_total'] > 0 ) ) {
-			$t_message .= $t_email_separator1."\n";
-			$t_message .= sprintf( lang_get( 'total_sponsorship_amount' ), sponsorship_format_amount( $p_visible_bug_data['sponsorship_total'] ) ) . "\n" . "\n";
+			# MASC RELATIONSHIP
 
-			if ( isset( $p_visible_bug_data['sponsorships'] ) ) {
-				foreach ( $p_visible_bug_data['sponsorships'] as $t_sponsorship ) {
-					$t_date_added = date( config_get( 'normal_date_format' ), db_unixtimestamp( $t_sponsorship->date_submitted ) );
-
-					$t_message .= $t_date_added . ': ';
-					$t_message .= user_get_name( $t_sponsorship->user_id );
-					$t_message .= ' (' . sponsorship_format_amount( $t_sponsorship->amount ) . ')' . "\n";
+			# Sponsorship
+			if ( isset( $p_visible_bug_data['sponsorship_total'] ) && ( $p_visible_bug_data['sponsorship_total'] > 0 ) ) {
+				$t_message .= $t_email_separator1."\n";
+				$t_message .= sprintf( lang_get( 'total_sponsorship_amount' ), sponsorship_format_amount( $p_visible_bug_data['sponsorship_total'] ) ) . "\n" . "\n";
+
+				if ( isset( $p_visible_bug_data['sponsorships'] ) ) {
+					foreach ( $p_visible_bug_data['sponsorships'] as $t_sponsorship ) {
+						$t_date_added = date( config_get( 'normal_date_format' ), db_unixtimestamp( $t_sponsorship->date_submitted ) );
+
+						$t_message .= $t_date_added . ': ';
+						$t_message .= user_get_name( $t_sponsorship->user_id );
+						$t_message .= ' (' . sponsorship_format_amount( $t_sponsorship->amount ) . ')' . "\n";
+					}
 				}
 			}
-		}
 
-		$t_message .= $t_email_separator1."\n\n";
+			$t_message .= $t_email_separator1."\n\n";
 
-		# format bugnotes
-		foreach ( $p_visible_bug_data['bugnotes'] as $t_bugnote ) {
-			$t_last_modified = date( $t_normal_date_format, $t_bugnote->last_modified );
-			$t_string = ' '.$t_bugnote->reporter_name.' - '.$t_last_modified.' ';
-
-			$t_message .= $t_email_separator2."\n";
-			$t_message .= $t_string."\n";
-			$t_message .= $t_email_separator2."\n";
-			$t_message .= wordwrap( $t_bugnote->note )."\n\n";
+			# format bugnotes
+			foreach ( $p_visible_bug_data['bugnotes'] as $t_bugnote ) {
+				$t_last_modified = date( $t_normal_date_format, $t_bugnote->last_modified );
+				$t_string = ' '.$t_bugnote->reporter_name.' - '.$t_last_modified.' ';
+
+				$t_message .= $t_email_separator2."\n";
+				$t_message .= $t_string."\n";
+				$t_message .= $t_email_separator2."\n";
+				$t_message .= wordwrap( $t_bugnote->note )."\n\n";
+			}
 		}
-
 		# format history
 		if ( array_key_exists( 'history', $p_visible_bug_data ) ) {
 			$t_message .=	lang_get( 'bug_history' ) . "\n";
@@ -933,11 +938,17 @@
 	# Build the bug raw data visible for specified user to be translated and sent by email to the user
 	# (Filter the bug data according to user access level)
 	# return array with bug data. See usage in email_format_bug_message(...)
-	function email_build_visible_bug_data( $p_user_id, $p_bug_id, $p_message_id ) {
+	function email_build_visible_bug_data( $p_user_id, $p_notice_format, $p_bug_id, $p_message_id ) {
 		$t_project_id = bug_get_field( $p_bug_id, 'project_id' );
 		$t_user_access_level = user_get_access_level( $p_user_id, $t_project_id );
 		$t_user_bugnote_order = user_pref_get_pref ( $p_user_id, 'bugnote_order' );
-		$t_user_bugnote_limit = user_pref_get_pref ( $p_user_id, 'email_bugnote_limit' );
+		if ( EMAIL_NOTICE_BRIEF == $p_notice_format ) { # Limit the number of notes based on user prefs
+			$t_user_bugnote_limit = user_pref_get_pref ( $p_user_id, 'email_bugnote_limit' );
+		} else if ( EMAIL_NOTICE_DIFF == $p_notice_format ) { # Display only new bugnote (if any) and any other changes.
+			$t_user_bugnote_limit = 1;
+		} else { # Display all bugnotes
+			$t_user_bugnote_limit = 0;
+		}
 
 		$row = bug_get_extended_row( $p_bug_id );
 		$t_bug_data = array();
Index: lang/strings_english.txt
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/lang/strings_english.txt,v
retrieving revision 1.215
diff -u -r1.215 strings_english.txt
--- lang/strings_english.txt	28 Sep 2004 14:09:40 -0000	1.215
+++ lang/strings_english.txt	5 Oct 2004 15:14:00 -0000
@@ -359,6 +359,10 @@
 $s_bugnote_order = 'Notes Sort Order';
 $s_bugnote_order_asc = 'Ascending';
 $s_bugnote_order_desc = 'Descending';
+$s_email_notice_long = 'Long';
+$s_email_notice_brief = 'Brief';
+$s_email_notice_diff = 'Diff';
+$s_email_notice_off = 'Off';
 $s_email_on_new = 'Email on New';
 $s_email_on_assigned = 'Email on Assigned';
 $s_email_on_feedback = 'Email on Feedback';
@@ -1064,4 +1068,4 @@
 
 # Source Control Integration
 $s_checkin = 'Checkin';
-?>
\ No newline at end of file
+?>
mantisbt.4278.diffemail.txt (28,532 bytes)   

Relationships

related to 0004043 closedbpfennig Preference to exclude old bugnotes from notification 
related to 0000895 acknowledged bugzilla type diff email instead of full bug each time. 
related to 0004937 closedvboctor Mantis 1.0.0a1 Release 

Activities

sgrund

sgrund

2004-08-06 01:28

reporter   ~0006678

sounds to be related to 0004043

jlatour

jlatour

2004-08-06 09:21

reporter   ~0006692

Humm, next time I go hunting for the feature request I remember being related to this, I'll look in the bugnotes first :-)

kesla

kesla

2004-08-13 03:51

reporter   ~0006969

is this also related to <a href="http://bugs.mantisbt.org/bug_view_page.php?bug_id=0000895">895</a>

kesla

kesla

2004-08-30 11:42

reporter   ~0007308

Last edited: 2004-08-30 11:42

Is it possible to get a screenshot from how it looks when getting a new e-mail that is brief?

And also, I still think that this ir related to bug 000896

edited on: 08-30-04 11:42

kesla

kesla

2004-08-30 12:02

reporter   ~0007310

Last edited: 2004-09-03 02:09

sorry about that...
it should have been bug 0000895 , "bugzilla type diff email instead of full bug each time."

edited on: 09-03-04 02:09

jlatour

jlatour

2004-09-02 14:49

reporter   ~0007406

Try just typing 0000895.

jlatour

jlatour

2004-09-02 14:50

reporter   ~0007407

(I mean # 895, without the space)

DGtlRift

DGtlRift

2004-09-09 06:31

reporter   ~0007508

I made a patch for this that does the following things:

  1. Uses bpfennig's changes but also allows user to set individual triggers
  2. Also addresses bug 0000895

I sent the patch to mantis-dev for review.

kesla

kesla

2004-10-04 16:43

reporter   ~0007898

Hi. It's been a while anything has been said about this issue. Has the devs got the patch? Will this issue be adressed as resolved anytime soon?

DGtlRift

DGtlRift

2004-10-05 07:40

reporter   ~0007905

Awaiting CVS approval and commit

vboctor

vboctor

2004-10-05 08:26

manager   ~0007908

DGtlRift,

  • Can you include samples of the emails?
  • In the patch, there is references to DIFF type where in the screen capture there is long, brief, off.
DGtlRift

DGtlRift

2004-10-05 10:29

reporter   ~0007913

I made some mods to the patch. I had merged the diff idea from 0000895, but missed a change in the core/constants and cleaned parameters from the last patch.

packeteer

packeteer

2004-11-03 00:54

reporter   ~0008231

will it be possible to define these options globally or per project?

DGtlRift

DGtlRift

2004-11-08 09:04

reporter   ~0008281

Right now these are set up as global options for the user. After taking a quick look, some reorganising of the UI for Preferences would need to be changed to support a per project setting of these feature, and a new table possibly (something like mantis_user_pref_proj_table) would need to be added along with either moving some of the preferences from mantis_user_pref_table or leaving them to indicate global settings for settings that do not exist for a project.

grangeway

grangeway

2004-11-22 18:01

reporter   ~0008401

wonders if he's missing something

Why's this been marked as resolved?

There's nothing in developer CVS for this atm, nor from sf.net mailing lists, and yet the bugs been closed off ?

DGtlRift

DGtlRift

2004-12-27 09:37

reporter   ~0008815

Right now these are set up as global options for the user. After taking a quick look, some reorganising of the UI for Preferences would need to be changed to support a per project setting of these feature, and a new table possibly (something like mantis_user_pref_proj_table) would need to be added along with either moving some of the preferences from mantis_user_pref_table or leaving them to indicate global settings for settings that do not exist for a project.

Awaiting review and CVS commit.

siebrand

siebrand

2005-09-12 05:12

developer   ~0011366

Looks like this issue got stuck in traffic. Would be great to have this in a mantis version soonish...

ag

ag

2005-11-10 04:07

reporter   ~0011606

I would also like to say that this is a very important feature for me, otherwise the emails are too detailed and are not going to be of any use. Also I would like to ask about the spacing of the email in the screen shot.

I am using Mantis 1.0.0RC1 and my email spacing is irregular, I do not get nicely formatted columns like the above screen shot. I have used two different email clients to view this and they both have the same experience. Is this issue fixed in a newer version, or is there a setting I need to tweak?

gwagenknecht

gwagenknecht

2005-11-10 04:32

reporter   ~0011607

You need to make sure that your mail reader uses a fixed-width font (for example, like Courier New).

siebrand

siebrand

2009-06-13 04:11

developer   ~0022130

Unassigned after having been assigned for multiple years without progress.