Index: bug_view_advanced_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_view_advanced_page.php,v
retrieving revision 1.69
diff -u -r1.69 bug_view_advanced_page.php
--- bug_view_advanced_page.php	12 Feb 2005 20:01:05 -0000	1.69
+++ bug_view_advanced_page.php	26 May 2005 20:08:13 -0000
@@ -29,6 +29,8 @@
 
 	access_ensure_bug_level( VIEWER, $f_bug_id );
 
+	bug_auto_acknowledge();
+
 	$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
 
 	compress_enable();
Index: bug_view_page.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/bug_view_page.php,v
retrieving revision 1.72
diff -u -r1.72 bug_view_page.php
--- bug_view_page.php	12 Feb 2005 20:01:05 -0000	1.72
+++ bug_view_page.php	26 May 2005 20:08:41 -0000
@@ -32,6 +32,8 @@
 
 	access_ensure_bug_level( VIEWER, $f_bug_id );
 
+	bug_auto_acknowledge();
+
 	$t_bug = bug_prepare_display( bug_get( $f_bug_id, true ) );
 
 	$t_access_level_needed = config_get( 'view_history_threshold' );
Index: config_defaults_inc.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/config_defaults_inc.php,v
retrieving revision 1.265
diff -u -r1.265 config_defaults_inc.php
--- config_defaults_inc.php	24 May 2005 17:35:02 -0000	1.265
+++ config_defaults_inc.php	26 May 2005 20:11:21 -0000
@@ -799,6 +799,11 @@
 	# the bug is in progress, rather than just put in a person's queue.
 	$g_auto_set_status_to_assigned	= ON;
 
+	# Automatically set status to ACKNOWLEDGED when an ASSIGNED issue is viewed
+	# by the handler.  This is useful to provide automatic feedback when a handler
+	# has looked at an issue.
+	$g_auto_acknowledge_assigned = OFF;
+	
 	# 'status_enum_workflow' defines the workflow, and reflects a simple
 	#  2-dimensional matrix. For each existing status, you define which
 	#  statuses you can go to from that status, e.g. from NEW_ you might list statuses
Index: core/bug_api.php
===================================================================
RCS file: /cvsroot/mantisbt/mantisbt/core/bug_api.php,v
retrieving revision 1.95
diff -u -r1.95 bug_api.php
--- core/bug_api.php	2 May 2005 14:06:58 -0000	1.95
+++ core/bug_api.php	26 May 2005 20:07:43 -0000
@@ -1400,4 +1400,21 @@
 
 		return $p_bug_data;
 	}
+	
+	function bug_auto_acknowledge() {
+		if (ON == config_get( 'auto_acknowledge_assigned' )) {
+			$f_bug_id = gpc_get_int( 'bug_id' );
+			$f_current_user = auth_get_current_user_id();
+			$f_handler_id = gpc_get_int( 'handler_id', bug_get_field( $f_bug_id, 'handler_id' ) );
+			$f_status  = gpc_get_int( 'status', bug_get_field( $f_bug_id, 'status' ) );
+			if ( ASSIGNED == $f_status ) {
+				if ($f_current_user == $f_handler_id) {
+					$t_notify = true;
+					$t_bug_data = bug_get( $f_bug_id, true );
+					$t_bug_data->status				= 30;
+					bug_update( $f_bug_id, $t_bug_data, true, ( false == $t_notify ) );
+				}
+			}
+		}
+	}
 ?>
