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; }