- Tue Sep 06, 2016 11:17 am
#786486
Hi everyone,
I’m currently creating a process. In that process users should have the option to manually select a deadline for the following task.
I tried to realize this by using a trigger setting the duration for the next task based on the chosen deadline. But somehow I fail to update the task duration in the task table.
The SQL statement in general seems to work. When I change the “tas_transfer_fly” from false to true or vice versa its changed in the process. But the TAS_DURATION value does not change at all. Doesn’t matter if I insert a variable ($days) or a fixed number.
Any ideas how to fix this? Thanks in advance for your help.
Best regards
Sicilio
Code:
$PROCESS=@=PROCESS;
$datetime1 =strtotime(@=currentDate); // created by getCurrentDate function
$datetime2 =strtotime(@=Deadline); // Date variable chosen by user in Dynaform
$datediff = $datetime2 - $datetime1;
$days= floor($datediff/(60*60*24));
$result = executeQuery("UPDATE TASK SET TAS_DURATION='$days',TAS_TYPE_DAY='2',TAS_TRANSFER_FLY='FALSE' WHERE PRO_UID='$PROCESS' AND TAS_UID='27496337857c462cab192d9030379160'"); // TAS_UID from the task i want to set the duration for
SQL Statement taken from viewtopic.php?t=43299
I’m currently creating a process. In that process users should have the option to manually select a deadline for the following task.
I tried to realize this by using a trigger setting the duration for the next task based on the chosen deadline. But somehow I fail to update the task duration in the task table.
The SQL statement in general seems to work. When I change the “tas_transfer_fly” from false to true or vice versa its changed in the process. But the TAS_DURATION value does not change at all. Doesn’t matter if I insert a variable ($days) or a fixed number.
Any ideas how to fix this? Thanks in advance for your help.
Best regards
Sicilio
Code:
$PROCESS=@=PROCESS;
$datetime1 =strtotime(@=currentDate); // created by getCurrentDate function
$datetime2 =strtotime(@=Deadline); // Date variable chosen by user in Dynaform
$datediff = $datetime2 - $datetime1;
$days= floor($datediff/(60*60*24));
$result = executeQuery("UPDATE TASK SET TAS_DURATION='$days',TAS_TYPE_DAY='2',TAS_TRANSFER_FLY='FALSE' WHERE PRO_UID='$PROCESS' AND TAS_UID='27496337857c462cab192d9030379160'"); // TAS_UID from the task i want to set the duration for
SQL Statement taken from viewtopic.php?t=43299