Developer
User Docs ↗
You are viewing documentation for RT 4.4.2, which is end-of-life and no longer supported. The current release is 6.0.4 (view the current version of this page).
RT supports upgrading from all older versions. See the README for instructions or contact us for assistance.

NAME

RT::Action::RecordComment - An Action which can be used from an external tool, or in any situation where a ticket transaction has not been started, to make a comment on the ticket.

SYNOPSIS

    my $action_obj = RT::Action::RecordComment->new(
        'TicketObj'   => $ticket_obj,
        'TemplateObj' => $template_obj,
    );
    my $result = $action_obj->Prepare();
    $action_obj->Commit() if $result;

METHODS

Prepare

Check for the existence of a Transaction. If a Transaction already exists, and is of type "Comment" or "Correspond", abort because that will give us a loop.

Commit

Create a Transaction by calling the ticket's Comment method on our parsed Template, which may have an RT-Send-Cc or RT-Send-Bcc header. The Transaction will be of type Comment. This Transaction can then be used by the scrips that actually send the email.

← Back to index