Skip to content

Commit 40cc7eb

Browse files
committed
fix(targetchange): entity from a question
Signed-off-by: btry <tbugier@teclib.com>
1 parent b9b2547 commit 40cc7eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inc/targetchange.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
10751075

10761076
// Default entity of a user from the answer of a user's type question
10771077
case 'user' :
1078-
$found = $answer->find('plugin_formcreator_formanwers_id = '.$formanswer->fields['id'].
1078+
$found = $answer->find('plugin_formcreator_forms_answers_id = '.$formanswer->fields['id'].
10791079
' AND plugin_formcreator_questions_id = '.$this->fields['destination_entity_value']);
10801080
$user = array_shift($found);
10811081
$user_id = $user['answer'];
@@ -1091,7 +1091,7 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
10911091

10921092
// Entity from the answer of an entity's type question
10931093
case 'entity' :
1094-
$found = $answer->find('plugin_formcreator_formanwers_id = '.$formanswer->fields['id'].
1094+
$found = $answer->find('plugin_formcreator_forms_answers_id = '.$formanswer->fields['id'].
10951095
' AND plugin_formcreator_questions_id = '.$this->fields['destination_entity_value']);
10961096
$entity = array_shift($found);
10971097

@@ -1128,7 +1128,7 @@ public function save(PluginFormcreatorForm_Answer $formanswer) {
11281128

11291129
$query = "SELECT answer
11301130
FROM `glpi_plugin_formcreator_answers`
1131-
WHERE `plugin_formcreator_formanwers_id` = " . (int) $formanswer->fields['id'] . "
1131+
WHERE `plugin_formcreator_forms_answers_id` = " . (int) $formanswer->fields['id'] . "
11321132
AND `plugin_formcreator_questions_id` IN (" . $this->fields['tag_questions'] . ")";
11331133
$result = $DB->query($query);
11341134
while ($line = $DB->fetch_array($result)) {

0 commit comments

Comments
 (0)