Original request on Resolve page

Hi all,
we thought it would be nice to be able to see the original request when
resolving a ticket.

Does anybody know how to implement this (or maybe someone already did)?

Thank you in advance
Cris

Hi all,
we thought it would be nice to be able to see the original request when
resolving a ticket.

Does anybody know how to implement this (or maybe someone already did)?

I’m not sure if there is anything in “core” for this, but I hacked
something together years ago. I’m not sure if I’d choose the same code
to accomplish the feat now, but this works in our environment:

package RT::Ticket;
no warnings qw(redefine);

use Text::Trim;
use Carp;

sub Problem {
my $self = shift;
my %args = (
return_not_determined => 1,
Type => ‘’,
@_,
);

my $transactions = $self->Transactions;
while (my $transaction = $transactions->Next) {
    if (($transaction->Type || q{}) eq 'Create') {
        my $content = trim(
            $transaction->Content(
                Type => $args{Type},
            )
        );

        return $content if $self->IsProblemOkay(problem => $content);
    }
}
my $subject = trim($self->Subject);
return $subject if $self->IsProblemOkay(problem => $subject);

if ($args{return_not_determined}) {
    return 'Problem not determined.';
}
else {
    return q{};
}

}

sub IsProblemOkay {
my $self = shift;
my %args = (
problem => undef,
@_,
);

return (defined $args{problem} && $args{problem} =~ /\S/);

}

You’ll need to hijack the RT::Ticket namespace to add those
subroutines. Then you can use it in templates and other places like:

$Ticket->Problem

HTH,

-m