[Vtigercrm-developers] vtiger 7.3 and 7.4 scheduled workflows error

Alexander Allen alexander.allenz at gmail.com
Thu Sep 22 18:23:43 GMT 2022


I found that in this versions, workflows with scheduled time are not
working because I get this database error #1525 - Incorrect DATETIME value:
''

I fixed it removing nexttrigger_time = ''  in function
getScheduledWorkflowsin
crmpath/modules/com_vtiger_workflow/VTWorkflowManager.inc

This was affecting various databases in my insntantes. If someone get the
same error you know what to do.  Sorry because I dont know how to send a
merge request...

Function here...->

function getScheduledWorkflows($referenceTime='') {
$adb=$this->adb;
$query = 'SELECT * FROM com_vtiger_workflows INNER JOIN vtiger_tab ON
vtiger_tab.name = com_vtiger_workflows.module_name WHERE
vtiger_tab.presence IN (0,2) AND execution_condition = ? AND status=?';
$params = array(VTWorkflowManager::$ON_SCHEDULE,1);
if($referenceTime != '') {
$query .= " AND (nexttrigger_time = '' OR nexttrigger_time IS NULL OR
nexttrigger_time <= ?)";
array_push($params, $referenceTime);
}
$result = $adb->pquery($query, $params);
return $this->getWorkflowsForResult($result);

}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20220922/884b2076/attachment.html>


More information about the vtigercrm-developers mailing list