[rt-users] Getting Content of a Ticket On Status Change

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Nov 2 10:45:31 EST 2005


On 11/2/05, Vaidute A <vaidutea at yahoo.com> wrote:
> Hello,
>
> Could you please help me to get the Content of the opened ticket using a
> scrip?
>
> I tried this:
>
> my $AttachObj = $self->TransactionObj->Attachments->First;
> my $content = $AttachObj->Content;
>
> and this:
>
> my $attachs = $self->TransactionObj->Attachments;
> my $attach;
> while( my $a = $attachs->Next )
> {
>   if( $a->ContentType eq 'text/plain' )
>   {
>     $attach = $a;
>     last
>   }
> }
> my $content = $attach->Content;
>
> But both pieces of code return tne Content of the current ticket when the
> condition is set to "On Create".
>
> How to get the Content of the ticket when the condition is set to "On Status
> Change"?

http://wiki.bestpractical.com/?FAQ
Templates

Q: The 'resolve' Transaction has no content

A: Status change (Resolve) is a standalone transaction, The Reply or
Comment that may accompany it is another standalone transaction,
therefore the Content of the resolve transaction is empty.

AddLastCommentToMail is a template part which you can use to add last
comment to email.

>
> The Content field of Attachments table in the database is empty when the
> transaction is caused by clicking "Open".
>
> Is there any way RT could give me the Content by specifying the id of the
> ticket? Or any other way to get the content on "Open"?
>
> Any help would be very appreciated.
>
> Vaida
>
>
>  ________________________________
>  Yahoo! FareChase - Search multiple travel sites in one click.
>
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Buy your copy of our new book, RT Essentials, today!
>
> Download a free sample chapter from
> http://rtbook.bestpractical.com
>
>


--
Best regards, Ruslan.



More information about the rt-users mailing list