Skip to content

Commit

Permalink
fix(formansswer): keep tickets on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Feb 8, 2024
1 parent 08d3871 commit b3cc8d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions inc/formanswer.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit b3cc8d2

Please sign in to comment.