- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/lib/item/converter/task/totemplate.php
- Класс: Bitrix\Tasks\Item\Converter\Task\ToTemplate
- Вызов: ToTemplate::transformData
protected function transformData(array $data, $srcInstance, $dstInstance, $result)
{
$newData = array_intersect_key($data, array(
'TITLE' => true,
'DESCRIPTION' => true,
'DESCRIPTION_IN_BBCODE' => true,
'PRIORITY' => true,
'TIME_ESTIMATE' => true,
'XML_ID' => true,
'CREATED_BY' => true,
'RESPONSIBLE_ID' => true,
'ALLOW_CHANGE_DEADLINE' => true,
'ALLOW_TIME_TRACKING' => true,
'TASK_CONTROL' => true,
'MATCH_WORK_TIME' => true,
'GROUP_ID' => true,
'PARENT_ID' => true,
'SITE_ID' => true,
'DURATION_PLAN' => true,
'REPLICATE' => true,
'REPLICATE_PARAMS' => true,
'MULTITASK' => true,
'DEPENDS_ON' => true,
'ACCOMPLICES' => true,
'AUDITORS' => true,
));
// do not spawn tasks with description in html format
if($data['DESCRIPTION_IN_BBCODE'] != 'Y')
{
if($data['DESCRIPTION'] != '')
{
$newData['DESCRIPTION'] = UI::convertHtmlToBBCode($data['DESCRIPTION']);
}
$newData['DESCRIPTION_IN_BBCODE'] = 'Y';
}
$newData['TASK_ID'] = $srcInstance->getId();
return $newData;
}