[Vtigercrm-commits] [vtiger-commits] r6483 - /vtigercrm/trunk/modules/Contacts/Contact.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 26 12:31:03 EDT 2006
Author: saraj
Date: Fri May 26 10:30:59 2006
New Revision: 6483
Log:
Updated the Related List Query for activity & history - Ahmed
Modified:
vtigercrm/trunk/modules/Contacts/Contact.php
Modified: vtigercrm/trunk/modules/Contacts/Contact.php
==============================================================================
--- vtigercrm/trunk/modules/Contacts/Contact.php (original)
+++ vtigercrm/trunk/modules/Contacts/Contact.php Fri May 26 10:30:59 2006
@@ -316,7 +316,7 @@
$log->info("Activity Related List for Contact Displayed");
- $query = "SELECT contactdetails.lastname, contactdetails.firstname, activity.activityid , activity.subject, activity.activitytype, activity.date_start, activity.due_date, cntactivityrel.contactid, crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime, recurringevents.recurringtype from contactdetails inner join cntactivityrel on cntactivityrel.contactid = contactdetails.contactid inner join activity on cntactivityrel.activityid=activity.activityid inner join crmentity on crmentity.crmid = cntactivityrel.activityid left outer join recurringevents on recurringevents.activityid=activity.activityid left join activitygrouprelation on activitygrouprelation.activityid=crmentity.crmid left join groups on groups.groupname=activitygrouprelation.groupname where contactdetails.contactid=".$id." and crmentity.deleted = 0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.eventstatus is NULL OR activity.eventstatus != 'Held') and ( activity.eventstatus is NULL OR activity.eventstatus != 'Not Held' )"; //recurring type is added in Query -Jaguar
+ $query = "SELECT contactdetails.lastname, contactdetails.firstname, activity.activityid , activity.subject, activity.activitytype, activity.date_start, activity.due_date, cntactivityrel.contactid, crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime, recurringevents.recurringtype from contactdetails inner join cntactivityrel on cntactivityrel.contactid = contactdetails.contactid inner join activity on cntactivityrel.activityid=activity.activityid inner join crmentity on crmentity.crmid = cntactivityrel.activityid left outer join recurringevents on recurringevents.activityid=activity.activityid left join activitygrouprelation on activitygrouprelation.activityid=crmentity.crmid left join groups on groups.groupname=activitygrouprelation.groupname where contactdetails.contactid=".$id." and crmentity.deleted = 0 and (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task') AND ( activity.status is NULL OR activity.status != 'Completed' ) and ( activity.eventstatus is NULL OR activity.eventstatus != 'Held') "; //recurring type is added in Query -Jaguar
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Contacts','Activities',$focus,$query,$button,$returnset);
@@ -339,7 +339,7 @@
left join groups on groups.groupname=activitygrouprelation.groupname
inner join users on crmentity.smcreatorid= users.id
where (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task')
- and (activity.status = 'Completed' or activity.status = 'Deferred' or (activity.eventstatus != 'Planned' and activity.eventstatus != ''))
+ and (activity.status = 'Completed' or activity.status = 'Deferred' or (activity.eventstatus = 'Held' and activity.eventstatus != ''))
and cntactivityrel.contactid=".$id;
//Don't add order by, because, for security, one more condition will be added with this query in include/RelatedListView.php
$log->debug("Entering get_history method ...");
More information about the vtigercrm-commits
mailing list