Skip to content

Commit eedb9a4

Browse files
committed
fix(targetticket): do not force request type
1 parent 91e1928 commit eedb9a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inc/targetticket.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,6 @@ protected function getTargetTemplate(array $data): int {
700700

701701
public function getDefaultData(PluginFormcreatorFormAnswer $formanswer): array {
702702
$data = parent::getDefaultData($formanswer);
703-
$data['requesttypes_id'] = PluginFormcreatorCommon::getFormcreatorRequestTypeId();
704703

705704
return $data;
706705
}
@@ -716,6 +715,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer) {
716715
$ticket = new Ticket();
717716
$form = $formanswer->getForm();
718717
$data = $this->getDefaultData($formanswer);
718+
$data['requesttypes_id'] = $data['requesttypes_id'] ?? PluginFormcreatorCommon::getFormcreatorRequestTypeId();
719719

720720
// Parse data
721721
// TODO: generate instances of all answers of the form and use them for the fullform computation

0 commit comments

Comments
 (0)