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.
$datetime1 =strtotime(@=currentDate); // created by getCurrentDate function
$datetime2 =strtotime(@=Deadline); // Date variable chosen by user in Dynaform
$datediff = $datetime2 - $datetime1;
$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