SendReminder.service sets *ALL* reminders as sent
Look at this line of code.
http://code.vtiger.com/vtiger/vtigercrm/blob/master/cron/SendReminder.service#L199
When it runs it sets the reminder_sent column of every row in the vtiger_activity_reminder table to 1.
This is wrong. If you start adding a number of events/tasks with different start date/times with a reminder, just after the sendReminder service has run, the next time it runs it will set ALL of them to having been sent.
The code snippet above doesn't actually make much sense though.
If there is a Recurring id it modifies the query and appends " and recurringid =?" but there is no WHERE in the original query so this is just wrong.
Either this is supposed to be part of the WHERE clause or it is trying to set the recurringid column (so needs a comma not an "AND") but I am not clear which it supposed to be.
I think the code should probably be something like:
$upd_query = "UPDATE vtiger_activity_reminder SET reminder_sent = ? WHERE activity_id = ?";
$upd_params = array('1', $activity_id);
if($recur_id!=0) {
$upd_query .= " AND recurringid = ?";
array_push($upd_params, $recur_id);
}
$adb->pquery($upd_query, $upd_params);