- Mon Jun 11, 2012 1:50 pm
#23100
Hi,
I'm using a MySQL query to update due dates for tasks based on date fields. The query I am using is:
I'm using a MySQL query to update due dates for tasks based on date fields. The query I am using is:
Code: Select all
My problem is that I have to put this query in the task itself, so it only updates after the user has opened the task at least once. How can I get it to update right when it is assigned? I tried to put it in the "after routing" bit of the previous task, but it didn't work, I guess because it gets the wrong @@TASK id. How can I get this done?$app=@@APPLICATION;
$proc=@@PROCESS;
$task=@@TASK;
$duedate = date('Y-m-d', strtotime(@@frmNewreq_priority) ) . ' 18:00:00';
$result = executeQuery("UPDATE app_delegation SET DEL_TASK_DUE_DATE='$duedate' WHERE APP_UID='$app' AND PRO_UID='$proc' AND TAS_UID='$task' ORDER BY DEL_INDEX DESC LIMIT 1");