[Vtigercrm-commits] [vtiger development] #5308: Ticket assigned to group and mail notification

vtiger development vtiger-tickets at trac.vtiger.com
Wed Jul 30 12:30:33 EDT 2008


#5308: Ticket assigned to group and mail notification
---------------------------------+------------------------------------------
  Reporter:  Giacomo.Sanchietti  |       Owner:  developer               
      Type:  patch               |      Status:  new                     
  Priority:  major               |   Milestone:  5.0.4                   
 Component:  vtigercrm           |     Version:  5.0.4                   
Resolution:                      |    Keywords:  ticket mail notification
---------------------------------+------------------------------------------
Changes (by Giacomo.Sanchietti):

  * priority:  minor => major

Comment:

 There is also another bug:
 no notification mail is sent to the group which the ticket is assigned.

 This happens because in function 'sendNotificationToGroups' inside
 CommonUtils.php, variable 'current_user' is not imported as global, so the
 method send_mail has no value for parameter 'from_name'.

 The patch is:
 --- include/utils/CommonUtils.php 2008-09-15 02:28:29.000000000 +0200
 +++ include/utils/CommonUtils.php 2008-09-22 01:46:06.000000000 +0200
 @@ -2167,7 +2167,7 @@
  //Function to send notification to the users of a group
  function sendNotificationToGroups($groupid,$crmid,$module)
  {
 -       global $adb,$app_strings;
 +       global $adb,$app_strings,$current_user;
         $returnEntity=Array();
         $returnEntity=getEntityName($module,Array($crmid));
         $mycrmid=$groupid;
 @@ -2187,6 +2187,8 @@
                        $pmodule = 'Users';
                        $description = $app_strings['MSG_DEAR']."
 ".$tosender.",<br>".$returnEntity[$crmid]."
 ".$app_strings['MSG_HAS_BEEN_CREATED_FOR']."
 ".$module."<br><br>".$app_strings['MSG_THANKS'].",<br>".$app_strings['MSG_VTIGERTEAM'];
                        require_once('modules/Emails/mail.php');
 +                      if($current_user->id==0)
 +                           $current_user->user_name = "vTiger";
                        $mail_status =
 send_mail('Emails',$emailadd,$current_user->user_name,'','Record created-
 vTiger Team',$description,'','','all',$focus->id);
                        $all_to_emailids []= $emailadd;
                         $mail_status_str .=
 $emailadd."=".$mail_status."&&&";

-- 
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5308#comment:1>
vtiger development <http://trac.vtiger.com/>
vtigerCRM




More information about the vtigercrm-commits mailing list