diff --git a/inc/formanswer.class.php b/inc/formanswer.class.php index 8bbdb423c..91bf4086d 100644 --- a/inc/formanswer.class.php +++ b/inc/formanswer.class.php @@ -490,6 +490,8 @@ public function saveAnswers($datas) $this->generateTarget(); break; } + } else { + $this->generateTarget(); } Session::addMessageAfterRedirect(__('The form have been successfully saved!', 'formcreator'), true, INFO); diff --git a/inc/targetticket.class.php b/inc/targetticket.class.php index e4ef32b70..3c0176866 100644 --- a/inc/targetticket.class.php +++ b/inc/targetticket.class.php @@ -188,7 +188,7 @@ public function save(PluginFormcreatorFormanswer $formanswer) $datas['_users_id_requester'] = $formanswer->fields['requester_id']; $datas['_users_id_recipient'] = $formanswer->fields['requester_id']; $datas['_users_id_lastupdater'] = Session::getLoginUserID(); - + // Create the target ticket $ticketID = $ticket->add($datas); $founded = $docItem->find('itemtype = "PluginFormcreatorFormanswer" AND items_id = ' . $formanswer->getID());