View Issue Details

IDProjectCategoryView StatusLast Update
0003635mantisbtemailpublic2004-05-17 10:26
Reportergrangeway Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Versiongit trunk 
Summary0003635: status_resolved in email_api should be resolved
Description

Line 362 of email API:
function email_resolved( $p_bug_id ) {
email_generic( $p_bug_id, 'status_resolved', 'email_notification_title_for_status_bug_resolved' );
}

This should read resolved, not status_resolved.

TagsNo tags attached.
Attached Files
3635.diff (1,813 bytes)   
Index: core/email_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/email_api.php,v
retrieving revision 1.69
diff -u -r1.69 email_api.php
--- core/email_api.php	5 Mar 2004 01:26:17 -0000	1.69
+++ core/email_api.php	14 Mar 2004 02:04:36 -0000
@@ -220,6 +220,10 @@
 		}
 
 		$t_pref_field = 'email_on_' . $p_notify_type;
+		$t_user_pref_table = config_get( 'mantis_user_pref_table' );
+		if ( ! db_field_exists( $t_pref_field, $t_user_pref_table ) ) {
+			$t_pref_field = false;
+		}
 
 		# @@@ we could optimize by modifiying user_cache() to take an array
 		#  of user ids so we could pull them all in.  We'll see if it's necessary
@@ -241,11 +245,13 @@
 			}
 
 			# Exclude users who have this notification type turned off
+			if ( $t_pref_field ) {
 				$t_notify = user_pref_get_pref( $t_id, $t_pref_field );
 				if ( OFF == $t_notify ) {
 					unset( $t_recipients[$t_id] );
 					continue;
 				}
+			}
 
 			# Finally, let's get their emails, if they've set one
 			$t_email = user_get_email( $t_id );
@@ -359,12 +365,12 @@
 	# --------------------
 	# send notices when a bug is RESOLVED
 	function email_resolved( $p_bug_id ) {
-		email_generic( $p_bug_id, 'status_resolved', 'email_notification_title_for_status_bug_resolved' );
+		email_generic( $p_bug_id, 'resolved', 'email_notification_title_for_status_bug_resolved' );
 	}
 	# --------------------
 	# send notices when a bug is CLOSED
 	function email_close( $p_bug_id ) {
-		email_generic( $p_bug_id, 'status_closed', 'email_notification_title_for_status_bug_closed' );
+		email_generic( $p_bug_id, 'closed', 'email_notification_title_for_status_bug_closed' );
 	}
 	# --------------------
 	# send notices when a bug is REOPENED
3635.diff (1,813 bytes)   

Activities

grangeway

grangeway

2004-03-04 05:34

reporter   ~0005165

send notices when a bug is CLOSED

function email_close( $p_bug_id ) {
    email_generic( $p_bug_id, 'status_closed', 'email_notification_title_for_status_bug_closed' );
}

Should read closed, not status_closed

jlatour

jlatour

2004-03-04 07:20

reporter   ~0005169

Why are you assigning this to me? ;)

Related Changesets

MantisBT: master cd39f415

2004-03-13 21:08

vboctor


Details Diff
Fix 0003635: status_resolved in email_api should be resolved.

M core/email_api.php
- Changed 'status_resolved' to 'resolved' before checking in preferences table (email_on_resolved).
- Changed 'status_closed' to 'closed' before checking in preferences table (email_on_closed).
- Check the existence of email_on_???? field before using it. I had this in before, but it was removed in a recent commit.

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@2437 <a class="text" href="/?p=mantisbt.git;a=object;h=f5dc347c">f5dc347c</a>-c33d-0410-90a0-b07cc1902cb9
Affected Issues
0003635
mod - core/email_api.php Diff File
mod - doc/ChangeLog Diff File