From b3cc8d2b9a7628891d192d6f234d4a29e641679e Mon Sep 17 00:00:00 2001 From: Thierry Bugier Date: Tue, 6 Feb 2024 15:44:12 +0100 Subject: [PATCH] fix(formansswer): keep tickets on delete --- inc/formanswer.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/inc/formanswer.class.php b/inc/formanswer.class.php index 1c9873d91..9fcde93f4 100644 --- a/inc/formanswer.class.php +++ b/inc/formanswer.class.php @@ -940,12 +940,16 @@ public function prepareInputForUpdate($input) { * @return boolean true if pre_delete actions succeeded, false if not */ public function pre_deleteItem() { + global $CFG_GLPI; + $issue = new PluginFormcreatorIssue(); $issue->deleteByCriteria([ 'items_id' => $this->getID(), 'itemtype' => self::getType(), ]); + $CFG_GLPI['keep_tickets_on_delete'] = '1'; + return true; }