Skip to content

Commit 6201d61

Browse files
Rom1-Bbtry
authored andcommitted
fix(tag): tag was always deleted
1 parent 5f2604a commit 6201d61

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

inc/targetchange.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
712712
return null;
713713
}
714714

715-
$this->saveTags($formanswer, $changeID);
716-
717715
// Add link between Change and FormAnswer
718716
$itemlink = $this->getItem_Item();
719717
$itemlink->add([
@@ -722,6 +720,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
722720
'changes_id' => $changeID,
723721
]);
724722

723+
$this->saveTags($formanswer, $changeID);
724+
725725
return $change;
726726
}
727727

inc/targetproblem.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
232232
return null;
233233
}
234234

235-
$this->saveTags($formanswer, $problemID);
236-
237235
// Add link between Problem and FormAnswer
238236
$itemlink = $this->getItem_Item();
239237
$itemlink->add([
@@ -242,6 +240,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
242240
'problems_id' => $problemID,
243241
]);
244242

243+
$this->saveTags($formanswer, $problemID);
244+
245245
return $problem;
246246
}
247247

inc/targetticket.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -922,8 +922,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
922922
}
923923
}
924924

925-
$this->saveTags($formanswer, $ticketID);
926-
927925
// Add link between Ticket and FormAnswer
928926
$itemlink = $this->getItem_Item();
929927
$itemlink->add([
@@ -932,6 +930,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
932930
'tickets_id' => $ticketID,
933931
]);
934932

933+
$this->saveTags($formanswer, $ticketID);
934+
935935
// Attach validation message as first ticket followup if validation is required and
936936
// if is set in ticket target configuration
937937
if ($form->validationRequired() && $this->fields['validation_followup']) {

0 commit comments

Comments
 (0)