Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tag): tag was always deleted #3348

Merged
merged 1 commit into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions inc/targetchange.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,8 +712,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
return null;
}

$this->saveTags($formanswer, $changeID);

// Add link between Change and FormAnswer
$itemlink = $this->getItem_Item();
$itemlink->add([
Expand All @@ -722,6 +720,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
'changes_id' => $changeID,
]);

$this->saveTags($formanswer, $changeID);

return $change;
}

Expand Down
4 changes: 2 additions & 2 deletions inc/targetproblem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
return null;
}

$this->saveTags($formanswer, $problemID);

// Add link between Problem and FormAnswer
$itemlink = $this->getItem_Item();
$itemlink->add([
Expand All @@ -242,6 +240,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
'problems_id' => $problemID,
]);

$this->saveTags($formanswer, $problemID);

return $problem;
}

Expand Down
4 changes: 2 additions & 2 deletions inc/targetticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,6 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
}
}

$this->saveTags($formanswer, $ticketID);

// Add link between Ticket and FormAnswer
$itemlink = $this->getItem_Item();
$itemlink->add([
Expand All @@ -932,6 +930,8 @@ public function save(PluginFormcreatorFormAnswer $formanswer): ?CommonDBTM {
'tickets_id' => $ticketID,
]);

$this->saveTags($formanswer, $ticketID);

// Attach validation message as first ticket followup if validation is required and
// if is set in ticket target configuration
if ($form->validationRequired() && $this->fields['validation_followup']) {
Expand Down
Loading