From f8fb51fea0b22c628f18ce62f85d171eddfa94b2 Mon Sep 17 00:00:00 2001 From: Anne-Catherine <57360138+accognet@users.noreply.github.com> Date: Thu, 31 Aug 2023 15:27:23 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B05145=20-=20Fix=20attachments=20missing?= =?UTF-8?q?=20in=20new=20ticket=20when=20clone=20from=20an=20old=20ticket?= =?UTF-8?q?=20with=20object=20copier=20(#530)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- datamodels/2.x/itop-attachments/main.itop-attachments.php | 1 + 1 file changed, 1 insertion(+) diff --git a/datamodels/2.x/itop-attachments/main.itop-attachments.php b/datamodels/2.x/itop-attachments/main.itop-attachments.php index 30d1ba7c2..6e332a9fb 100644 --- a/datamodels/2.x/itop-attachments/main.itop-attachments.php +++ b/datamodels/2.x/itop-attachments/main.itop-attachments.php @@ -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();