Have you planned to set up SLTs like TTO and TTR but based on a time in the past (prior to the create / start date) while managing the working days and hours as well as the pending times?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am wondering if I have not already answered that one...
Let's imagine you would like the TTO to start from the real beginning of a UserRequest as define in a “real_date” attribute of the UserRequest. To do this, within method OnInsert, add:
Have you planned to set up SLTs like TTO and TTR but based on a time in the past (prior to the create / start date) while managing the working days and hours as well as the pending times?
I am wondering if I have not already answered that one...
Let's imagine you would like the TTO to start from the real beginning of a UserRequest as define in a “real_date” attribute of the UserRequest. To do this, within method OnInsert, add:
~~~
$oStartDate = new DateTime($this->Get('real_date'));
$oTTO = $this->Get('tto');
$oAttDef = MetaModel::GetAttributeDef(get_class($this), 'tto');
$oTTO->Start($this, $oAttDef, $oStartDate->format('U'));
$oTTO->ComputeDeadlines($this, $oAttDef);
$this->Set('tto', $oTTO);
~~~