#
# COPYRIGHT:
#
-# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC
# <sales@bestpractical.com>
#
# (Except where explicitly superseded by other copyright notices)
package RT::Action::RecordComment;
use base 'RT::Action';
use strict;
+use warnings;
=head1 NAME
=head1 SYNOPSIS
-my $action_obj = RT::Action::RecordComment->new('TicketObj' => $ticket_obj,
- 'TemplateObj' => $template_obj,
- );
-my $result = $action_obj->Prepare();
-$action_obj->Commit() if $result;
+ my $action_obj = RT::Action::RecordComment->new(
+ 'TicketObj' => $ticket_obj,
+ 'TemplateObj' => $template_obj,
+ );
+ my $result = $action_obj->Prepare();
+ $action_obj->Commit() if $result;
=head1 METHODS
sub Prepare {
my $self = shift;
if (defined $self->{'TransactionObj'} &&
- $self->{'TransactionObj'}->Type =~ /^(Comment|Correspond)$/) {
- return undef;
+ $self->{'TransactionObj'}->Type =~ /^(Comment|Correspond)$/) {
+ return undef;
}
return 1;
}
my $self = shift;
my ($result, $msg) = $self->{'TemplateObj'}->Parse(
- TicketObj => $self->{'TicketObj'});
+ TicketObj => $self->{'TicketObj'});
return undef unless $result;
-
+
my ($trans, $desc, $transaction) = $self->{'TicketObj'}->Comment(
- MIMEObj => $self->TemplateObj->MIMEObj);
+ MIMEObj => $self->TemplateObj->MIMEObj);
$self->{'TransactionObj'} = $transaction;
}
-
+
RT::Base->_ImportOverlays();