[Vtigercrm-commits] [vtiger-commits] r5931 - in /vtigercrm/trunk: data/CRMEntity.php include/language/en_us.lang.php include/utils/EditViewUtils.php modules/CustomView/PopulateCustomView.php modules/Users/Popup.php modules/Users/Security.php schema/DatabaseSchema.xml
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 12 12:06:50 EDT 2006
Author: don
Date: Fri May 12 10:06:36 2006
New Revision: 5931
Log:
Email issues has been fixed
Modified:
vtigercrm/trunk/data/CRMEntity.php
vtigercrm/trunk/include/language/en_us.lang.php
vtigercrm/trunk/include/utils/EditViewUtils.php
vtigercrm/trunk/modules/CustomView/PopulateCustomView.php
vtigercrm/trunk/modules/Users/Popup.php
vtigercrm/trunk/modules/Users/Security.php
vtigercrm/trunk/schema/DatabaseSchema.xml
Modified: vtigercrm/trunk/data/CRMEntity.php
==============================================================================
--- vtigercrm/trunk/data/CRMEntity.php (original)
+++ vtigercrm/trunk/data/CRMEntity.php Fri May 12 10:06:36 2006
@@ -99,8 +99,11 @@
{
$realid=explode("@",$myids[$i]);
$mycrmid=$realid[0];
-
- $mysql='insert into seactivityrel values('.$mycrmid.','.$actid.')';
+ //added to handle the relationship of emails with users
+ if($realid[1] == -1)
+ $mysql='insert into salesmanactivityrel values('.$mycrmid.','.$actid.')';
+ else
+ $mysql='insert into seactivityrel values('.$mycrmid.','.$actid.')';
$adb->query($mysql);
}
}
Modified: vtigercrm/trunk/include/language/en_us.lang.php
==============================================================================
--- vtigercrm/trunk/include/language/en_us.lang.php (original)
+++ vtigercrm/trunk/include/language/en_us.lang.php Fri May 12 10:06:36 2006
@@ -604,6 +604,7 @@
'COMBO_HELPDESK'=>'HelpDesk',
+'COMBO_USERS'=>'Users',
'LBL_SELECT'=>'Select',
Modified: vtigercrm/trunk/include/utils/EditViewUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/EditViewUtils.php (original)
+++ vtigercrm/trunk/include/utils/EditViewUtils.php Fri May 12 10:06:36 2006
@@ -453,6 +453,15 @@
else
{
$assigned_user_id = $current_user->id;
+ }
+ if($col_fields['record_id'] != '')
+ {
+ $attachmentid=$adb->query_result($adb->query("select * from seattachmentsrel where crmid = ".$col_fields['record_id']),0,'attachmentsid');
+ if($col_fields[$fieldname] == '' && $attachmentid != '')
+ {
+ $attachquery = "select * from attachments where attachmentsid=".$attachmentid;
+ $value = $adb->query_result($adb->query($attachquery),0,'name');
+ }
}
if($value!='')
$filename=' [ '.$value. ' ]';
@@ -788,6 +797,15 @@
$parent_id .=$mycrmid.'@0|' ;//make it such that the email adress sent is remebered and only that one is retrived
$parent_name .= $account_name.'<'.$myemail.'>; ';
$account_selected = 'selected';
+ }elseif($parent_module == "Users")
+ {
+ $sql = "select user_name,email1 from users where id=".$mycrmid;
+ $result = $adb->query($sql);
+ $account_name = $adb->query_result($result,0,"user_name");
+ $myemail=$adb->query_result($result,0,"email1");
+ $parent_id .=$mycrmid.'@0|' ;//make it such that the email adress sent is remebered and only that one is retrived
+ $parent_name .= $account_name.'<'.$myemail.'>; ';
+ $user_selected = 'selected';
}
}
}
@@ -800,7 +818,8 @@
$editview_label[] = array(
$app_strings['COMBO_CONTACTS']=>$contact_selected,
$app_strings['COMBO_ACCOUNTS']=>$account_selected,
- $app_strings['COMBO_LEADS']=>$lead_selected
+ $app_strings['COMBO_LEADS']=>$lead_selected,
+ $app_strings['COMBO_USERS']=>$user_selected
);
$fieldvalue[] =$parent_name;
$fieldvalue[] = $parent_id;
Modified: vtigercrm/trunk/modules/CustomView/PopulateCustomView.php
==============================================================================
--- vtigercrm/trunk/modules/CustomView/PopulateCustomView.php (original)
+++ vtigercrm/trunk/modules/CustomView/PopulateCustomView.php Fri May 12 10:06:36 2006
@@ -267,9 +267,8 @@
'crmentity:smownerid:assigned_user_id:Activities_Assigned_To:V'),
Array('activity:subject:subject:Emails_Subject:V',
- 'seactivityrel:crmid:parent_id:Emails_Related_To:I',
- 'activity:date_start:date_start:Emails_Date_Sent:D',
- 'crmentity:smownerid:assigned_user_id:Emails_Sender:V'),
+ 'crmentity:smownerid:assigned_user_id:Emails_Sender:V'
+ 'activity:date_start:date_start:Emails_Date_Sent:D'),
Array('crmentity:crmid::Invoice_Invoice_Id:I',
'invoice:subject:subject:Invoice_Subject:V',
Modified: vtigercrm/trunk/modules/Users/Popup.php
==============================================================================
--- vtigercrm/trunk/modules/Users/Popup.php (original)
+++ vtigercrm/trunk/modules/Users/Popup.php Fri May 12 10:06:36 2006
@@ -63,12 +63,18 @@
// Start the output
////////////////////////////////////////////////////////
if (!isset($_REQUEST['html'])) {
- $form =new XTemplate ('modules/Users/Popup_picker.html');
+ if($_REQUEST['popuptype'] != 'set_return_emails')
+ $form =new XTemplate ('modules/Users/Popup_picker.html');
+ else
+ $form =new XTemplate ('modules/Users/Popup_picker_emails.html');
$form->assign("POPUPTYPE",$_REQUEST['popuptype']);
$log->debug("using file modules/Users/Popup_picker.html");
}
else {
- $form =new XTemplate ('modules/Users/'.$_REQUEST['html'].'.html');
+ if($_REQUEST['popuptype'] != 'set_return_emails')
+ $form =new XTemplate ('modules/Users/'.$_REQUEST['html'].'.html');
+ else
+ $form =new XTemplate ('modules/Users/Popup_picker_emails.html');
$log->debug("using file modules/Users/".$_REQUEST['html'].'.html');
$log->debug("_REQUEST['html'] is ".$_REQUEST['html']);
}
@@ -106,6 +112,10 @@
$the_javascript .= " window.opener.document.EditView.reports_to_id.value = user_id;\n";
$the_javascript .= "}\n";
$the_javascript .= "</script>\n";
+}
+elseif($_REQUEST['popuptype'] == 'set_return_emails')
+{
+ $the_javascript = "<script type='text/javascript' src='include/js/Mail.js'></script>";
}
else // ($_REQUEST['form'] == 'EditView')
{
Modified: vtigercrm/trunk/modules/Users/Security.php
==============================================================================
--- vtigercrm/trunk/modules/Users/Security.php (original)
+++ vtigercrm/trunk/modules/Users/Security.php Fri May 12 10:06:36 2006
@@ -493,7 +493,7 @@
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'crmid','seactivityrel',1,'357','parent_id','Related To',1,0,0,100,1,22,1,'I~O',1,null,'BAS')");
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'smownerid','crmentity',1,'53','assigned_user_id','Assigned To',1,0,0,100,5,21,1,'V~M',1,null,'BAS')");
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'subject','activity',1,'2','subject','Subject',1,0,0,100,1,23,1,'V~M',0,1,'BAS')");
- $this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'filename','attachments',1,'61','filename','Attachment',1,0,0,100,1,23,1,'V~O',1,null,'BAS')");
+ $this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'filename','attachments',1,'61','filename','Attachment',1,0,0,100,2,23,1,'V~O',1,null,'BAS')");
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'description','crmentity',1,'19','description','Description',1,0,0,100,1,24,1,'V~O',1,null,'BAS')");
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'time_start','activity',1,'2','time_start','Time Start',1,0,0,100,9,1,23,'T~O',1,null,'BAS')");
$this->db->query("insert into field values (10,".$this->db->getUniqueID("field").",'createdtime','crmentity',1,'70','createdtime','Created Time',1,0,0,100,10,1,22,'T~O',1,null,'BAS')");
Modified: vtigercrm/trunk/schema/DatabaseSchema.xml
==============================================================================
--- vtigercrm/trunk/schema/DatabaseSchema.xml (original)
+++ vtigercrm/trunk/schema/DatabaseSchema.xml Fri May 12 10:06:36 2006
@@ -5039,5 +5039,37 @@
</index>
<opt platform="mysql">Type=InnoDB</opt>
</table>
+ <table name="emaildetails">
+ <field name="emailid" type="I" size="19">
+ <notnull />
+ <key />
+ </field>
+ <field name="from_email" type="C" size="50">
+ <notnull />
+ <default value="" />
+ </field>
+ <field name="to_email" type="X">
+ <notnull />
+ </field>
+ <field name="cc_email" type="X">
+ <notnull />
+ </field>
+ <field name="bcc_email" type="X">
+ <notnull />
+ </field>
+ <field name="assigned_user_email" type="C" size="50">
+ <notnull />
+ <default value="" />
+ </field>
+ <field name="idlists" type="C" size="50">
+ <notnull />
+ <default value="" />
+ </field>
+ <field name="email_flag" type="C" size="50">
+ <notnull />
+ <default value="" />
+ </field>
+ </table>
+
</schema>
More information about the vtigercrm-commits
mailing list