I just commented on a ticket assigned to me, I don't need a follow up email telling me what I just did. ;)

Comments

OnlineWD™’s picture

Have tried some things and have solution but needs testing. Don't know how to make patches so will share code ..

Here is modified function starting line 1346 in support.module, have added + to indicate what was added ..

<?php
function _support_mail_notify($op, $account, $comment = array(), $nid = NULL, $suppress = FALSE, $language = NULL) {
  $notify = variable_get('support_mail_'. $op .'_notify', TRUE);
  if ($notify) {
    $node = node_load($nid);
    $params['account'] = $account;
    $params['nid'] = $nid;
    if (isset($comment['cid'])) {
      $params['cid'] = $comment['cid'];
      $params['comment'] = $comment;
+     $params['uid'] = $comment['uid'];
    }
    else {
      $params['cid'] = 0;
    }
    $params['suppress'] = $suppress;
    $language = $language ? $language : user_preferred_language($account);
    $params['integrate_email'] = db_result(db_query('SELECT integrate_email FROM {support_client} WHERE clid = %d', $node->client));
    if ($params['integrate_email'] == TRUE) {
      $mailfrom = db_result(db_query('SELECT mailfrom FROM {support_client} WHERE clid = %d', $node->client));
    }
    else {
      $mailfrom = variable_get('support_global_mailfrom', '');
    }
+   if($params['uid'] !== $account->uid){
    $mail = drupal_mail('support', $op, $account->mail, $language, $params, $mailfrom);
    // TODO: notify admins as necessary
+	}
  }
  return empty($mail) ? NULL : $mail['result'];
}
?>

Stops email being sent to user who posted new comment and sends email to those who are subscribed to ticket but as I say, this only took 30 minutes so could be some unwanted behaviour.

Durrok’s picture

Thanks OnlineWD, I'll give it a shot tomorrow and let you know.

rsevero’s picture