Hey Alex, On Wed, Oct 26, 2016 at 4:29 PM, Alex Hall <ah...@autodist.com> wrote: > Hi all, > The way our company uses RT, there's no need to distinguish between comments > and replies, and users may use either one without realizing the difference. > In my new email template, I want to show whichever was set. My template > works fine without the two if statements I'm trying to use, but as soon as I > put them in, it fails. The odd thing is that, though the email using the > template is never sent, I don't get any errors at all. When I was missing a > dollar sign earlier, I got an error--an error not really related to the > dollar sign, but an error. Now, though, I get nothing whatsoever. Here's the > snippet:
You can see some documentation regarding txns at: https://docs.bestpractical.com/rt/4.4.1/RT/Transaction.html > { if (my $transactionCorrespond = $Transaction->correspond) { > $transactionCorrespond > } elsif (my $transactionComment = $Transaction->comment) { > $transactionComment } > } # Here is some untested code... my $type = $Transaction->Type; # $type now holds "Correspond" or "Comment" if ($type eq 'Correspond') { # do something for correspond } elsif ($type eq 'Comment') { # do something for comment } else { # Perhaps this txn is a Create... } -m --------- RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017