--- eventum.orig/include/class.history.php	2006-12-05 22:28:56.988199840 +0200
+++ eventum/include/class.history.php	2006-12-05 22:29:38.229135817 +0200
@@ -215,10 +215,24 @@
      * @param   date $start The start date
      * @param   date $end The end date
      * @param   date $separate_closed If closed issues should be included in a separate array
+     * @param   array $htt_exclude Addtional History Types to ignore
      * @return  array An array of issues touched by the user.
      */
-    function getTouchedIssuesByUser($usr_id, $start, $end, $separate_closed = false)
+    function getTouchedIssuesByUser($usr_id, $start, $end, $separate_closed = false, $htt_exclude = array())
     {
+
+        $htt_list = History::getTypeID(
+            array_merge(array(
+                'notification_removed',
+                'notification_added',
+                'notification_updated',
+                'remote_replier_added',
+                'replier_added',
+                'replier_removed',
+                'replier_other_added',
+            ), $htt_exclude)
+        );
+
         $stmt = "SELECT
                     iss_id,
                     iss_prj_id,
@@ -236,14 +250,7 @@
                     his_iss_id = iss_id AND
                     his_usr_id = " . Misc::escapeInteger($usr_id) . " AND
                     his_created_date BETWEEN '" . Misc::escapeString($start) . "' AND '" . Misc::escapeString($end) . "' AND
-                    his_htt_id NOT IN(" . join(',', History::getTypeID(array(
-                        'notification_removed',
-                        'notification_added',
-                        'notification_updated',
-                        'remote_replier_added',
-                        'replier_added',
-                        'replier_removed',
-                        'replier_other_added'))) . ") AND
+                    his_htt_id NOT IN(" . join(',', $htt_list) . ") AND
                     iss_prj_id = " . Auth::getCurrentProject() . "
                  GROUP BY
                     iss_id";
--- eventum.orig/include/class.report.php	2006-12-05 22:28:57.028200748 +0200
+++ eventum/include/class.report.php	2006-12-05 22:29:38.239136044 +0200
@@ -292,9 +292,10 @@
      * @param   string The start date of this report.
      * @param   string The end date of this report.
      * @param   boolean If closed issues should be separated from other issues.
+     * @param   boolean If issue status changes should be ignored in report.
      * @return  array An array of data containing all the elements of the weekly report.
      */
-    function getWeeklyReport($usr_id, $start, $end, $separate_closed = false)
+    function getWeeklyReport($usr_id, $start, $end, $separate_closed = false, $ignore_statuses = false)
     {
         $prj_id = Auth::getCurrentProject();
         $usr_id = Misc::escapeInteger($usr_id);
@@ -353,12 +354,19 @@
             "other"         =>  Support::getSentEmailCountByUser($usr_id, $start_ts, $end_ts, false)
         );
 
+        $htt_exclude = array();
+        if ($ignore_statuses) {
+            $htt_exclude[] = 'status_changed';
+            $htt_exclude[] = 'status_auto_changed';
+            $htt_exclude[] = 'remote_status_change';
+        }
+
         $data = array(
             "start"     => str_replace('-', '.', $start),
             "end"       => str_replace('-', '.', $end),
             "user"      => User::getDetails($usr_id),
             "group_name"=> Group::getName(User::getGroupID($usr_id)),
-            "issues"    => History::getTouchedIssuesByUser($usr_id, $start_ts, $end_ts, $separate_closed),
+            "issues"    => History::getTouchedIssuesByUser($usr_id, $start_ts, $end_ts, $separate_closed, $htt_exclude),
             "status_counts" => History::getTouchedIssueCountByStatus($usr_id, $start_ts, $end_ts),
             "new_assigned_count"    =>  $newly_assigned,
             "time_tracking" => $time_tracking,
--- eventum.orig/reports/weekly.php	2006-12-05 22:28:57.838219132 +0200
+++ eventum/reports/weekly.php	2006-12-05 22:29:38.229135817 +0200
@@ -75,7 +75,7 @@
     }
 
     // print out emails
-    $data = Report::getWeeklyReport($HTTP_POST_VARS["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed']);
+    $data = Report::getWeeklyReport($HTTP_POST_VARS["developer"], $dates[0], $dates[1], @$_REQUEST['separate_closed'], @$_REQUEST['ignore_statuses']);
     $tpl->assign("data", $data);
 }
 
--- eventum.orig/templates/reports/weekly.tpl.html	2006-12-05 22:28:57.498211415 +0200
+++ eventum/templates/reports/weekly.tpl.html	2006-12-05 22:29:38.239136044 +0200
@@ -65,13 +65,17 @@
           </td>
         </tr>
         <tr>
-          <td width="120" class="default">
+          <td width="120" class="default" valign="top">
             <b>{t}Options{/t}:</b>
           </td>
           <td width="200" class="default">
             <input type="checkbox" name="separate_closed" value="1" class="default" {if $smarty.post.separate_closed == 1}checked{/if}>
             <a id="link" class="link" href="javascript:void(null)" 
                             onClick="javascript:toggleCheckbox('weekly_report', 'separate_closed', 0)">{t}Separate Closed Issues{/t}</a>&nbsp;
+            <br />
+            <input type="checkbox" name="ignore_statuses" value="1" class="default" {if $smarty.post.ignore_statuses == 1}checked{/if}>
+            <a id="link" class="link" href="javascript:void(null)" 
+                            onClick="javascript:toggleCheckbox('weekly_report', 'ignore_statuses', 0)">{t}Ignore Issue Status Changes{/t}</a>&nbsp;
           </td>
         </tr>
       </table>
