Hi Matt,

thanks. Totally out of my depth. At least I know to give up on that one!

w.


On 19/08/16 15:49, Matt Zagrabelny wrote:
Hi Woody,

On Fri, Aug 19, 2016 at 7:26 AM, Woody - Wild Thing Safaris
<wo...@wildthingsafaris.com> wrote:
HI all,

My correspond scrip adds a table of CF values to the correspond email from
the template, and sends to the client. I would like those same changes
appended to the transaction content that appears in the history, so it
matches what was sent to the client and we know easily what was sent.

to test i have made a scrip, on correspond, custom action, template blank

action is

my $content = $self->TransactionObj->ContentObj->Content;
$content .= "SOME OTHER STUFF";
$self->TransactionObj->ContentObj->SetContent($content);

no errors, but the content is not changed
The Txn already happened and its content is immutable - sort of. That
is, transactions (txns) are the atomic unit of data in RT. Those are
the things that make sure the paper trail exists for all the other
objects (users, tickets, queues, etc.)

That said, there is enough rope to do what you want. I don't know
exactly the procedure because I haven't implemented your use-case.

You'll want to expose the Transaction's parent's _Set method. In a
local module that gets loaded have some code like:

# {{{
# paper-trail auditor backdoor :)
# Needed to change the txn's content
package RT::Transaction;

use strict;
no warnings qw(redefine);

sub _Set {
     my $self = shift;
     $self->SUPER::_Set(@_);
}
# }}}

There may be more steps beyond this, but I think you'll need this at a minimum.

-m



--

-----------------------

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.

UK: 2B Habbo St, Greenwich, London
Dar es Salaam: 5 Ethan St, Mbezi beach
Arusha: 3 Ebeneezer Rd, Njiro
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 742 373 327
Skype: woody1tz
http://wildthingsafaris.com

---------
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017

Reply via email to