Upload via GUI (267 Dateien)
This commit is contained in:
@@ -117,16 +117,19 @@ function public_ticket_create(PDO $pdo, array $in, string $clientIp): array
|
||||
}
|
||||
foreach ($ruleResult['add_tags'] as $tagName) apply_tag_to_ticket($pdo, $ticketId, $tagName);
|
||||
apply_auto_reply($pdo, $ticketId, $ruleResult['auto_reply']);
|
||||
$closedByRule = apply_rule_close($pdo, $ticketId, $ruleResult);
|
||||
|
||||
$d = $pdo->prepare('SELECT name, email FROM departments WHERE id = ?');
|
||||
$d->execute([$deptId]);
|
||||
$dept = $d->fetch();
|
||||
$forNotify = ['ticket_number' => $number, 'subject' => $subject, 'requester_name' => $name, 'requester_email' => $email,
|
||||
'department_id' => $deptId, 'department_name' => $dept['name'] ?? null];
|
||||
notify_new_ticket_channels($forNotify, $dept['email'] ?? null);
|
||||
notify_staff_new_ticket($forNotify);
|
||||
notify_customer_ticket_created($forNotify);
|
||||
webhook_dispatch($pdo, 'ticket.created', $ticketId);
|
||||
if (!$closedByRule) {
|
||||
notify_new_ticket_channels($forNotify, $dept['email'] ?? null);
|
||||
notify_staff_new_ticket($forNotify);
|
||||
notify_customer_ticket_created($forNotify);
|
||||
webhook_dispatch($pdo, 'ticket.created', $ticketId);
|
||||
}
|
||||
return ['number' => $number, 'id' => $ticketId];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user