For a onCreate Condition a scrip deletes all original requestors and sets a new one. The next scrip sends a onCreate notification, however it sends the email to the old (deleted) requestor.
- All further correspondance is sent correctly (when created via the webinterface).
- Order of the Scrips is set correctly.
Simplified code:
if (some condition) {
# Remove all requestors
for ($self->TicketObj->Requestors->MemberEmailAddresses) {
$self->TicketObj->DeleteWatcher (
Type => 'Requestor',
Email => $_,
Silent => 0
);
# Add new requestor
$self->TicketObj->AddWatcher (
Type => "Requestor",
Email => $email_new
);
}
return 1;