N°5145 - Fix attachments missing in new ticket when clone from an old ticket with object copier (#530)

This commit is contained in:
Anne-Catherine
2023-08-31 15:27:23 +02:00
committed by GitHub
parent d797436786
commit f8fb51fea0

View File

@@ -344,6 +344,7 @@ class AttachmentPlugIn implements iApplicationUIExtension, iApplicationObjectExt
while ($oAttachment = $oSet->Fetch())
{
$oTempAttachment = clone $oAttachment;
$oTempAttachment->Set('expire', time() + utils::GetConfig()->Get('draft_attachments_lifetime'));
$oTempAttachment->Set('item_id', null);
$oTempAttachment->Set('temp_id', $sTempId);
$oTempAttachment->DBInsert();