Skip to content

Commit

Permalink
fix(targetticket): do not force request type
Browse files Browse the repository at this point in the history
  • Loading branch information
btry committed Jan 7, 2022
1 parent 372a917 commit dedef1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ protected function getTargetTemplate(array $data): int {

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

return $data;
}
Expand All @@ -909,6 +908,7 @@ public function save(PluginFormcreatorFormAnswer $formanswer) {
$ticket = new Ticket();
$form = $formanswer->getForm();
$data = $this->getDefaultData($formanswer);
$data['requesttypes_id'] = $data['requesttypes_id'] ?? PluginFormcreatorCommon::getFormcreatorRequestTypeId();

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

0 comments on commit dedef1d

Please sign in to comment.