Skip to content

Commit 77d3a32

Browse files
committed
fix(issue): update handling of url in emai: notifications
Signed-off-by: Thierry Bugier <[email protected]>
1 parent cf8f56f commit 77d3a32

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

setup.php

+9-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,15 @@ function plugin_init_formcreator() {
188188
if (isset($decodedUrl['forcetab'])) {
189189
Session::setActiveTab(Ticket::class, $decodedUrl['forcetab']);
190190
}
191-
Html::redirect(FORMCREATOR_ROOTDOC . '/front/issue.form.php?id=' . $_GET['id'] . '&sub_itemtype=Ticket' . $openItilFollowup);
191+
$issue = new PluginFormcreatorIssue();
192+
$issue->getFromDBByCrit([
193+
'sub_itemtype' => Ticket::class,
194+
'original_id' => (int) $_GET['id']
195+
]);
196+
if ($issue->isNewItem()) {
197+
Html::displayNotFoundError();
198+
}
199+
Html::redirect($issue->getFormURLWithID($issue->getID()) . $openItilFollowup);
192200
}
193201
}
194202

0 commit comments

Comments
 (0)