[Vtigercrm-developers] projects on the calendar

Alan Bell alan.bell at libertus.co.uk
Mon Oct 19 09:12:46 GMT 2015


in modules/Calendar/actions/Feed.php in the pullProjects function at 
line 337 there is:

         $params = array_merge($params,$userAndGroupIds);

which then gets used in this query  . . .

                 $query = "SELECT projectname, startdate, targetenddate, 
crmid FROM vtiger_project";
                 $query.= " INNER JOIN vtiger_crmentity ON 
vtiger_project.projectid = vtiger_crmentity.crmid";
                 $query.= " WHERE vtiger_crmentity.deleted=0 AND 
smownerid IN (". generateQuestionMarks($userAndGroupIds) .") AND ";
                 $query.= " ((startdate >= ? AND targetenddate < ?) OR ( 
targetenddate >= ?))";
                 $queryResult = $db->pquery($query, $params);

however, the questionmarks for the users and groups come before the date 
parameters, so it doesn't work and projects don't display on the 
calendar, changing line 337 to put the users and groups first fixes it:

         $params = array_merge($userAndGroupIds,$params);


Alan.


More information about the vtigercrm-developers mailing list