On Tue, 2010-03-09 at 15:59 -0500, Jason A. Smith wrote:
> On Mon, 2010-03-08 at 14:29 -0500, Jason A. Smith wrote:
> > 
> > I am trying to get the scrip to not notify anyone when the ticket is
> > automatically moved to a different queue, which is easy, but if the
> > ticket is not moved, it should notify the AdminCcs, just like normal.
> > What code in a Scrip will duplicate that default notify action?
> 
> I tried looking through the RT code to see if I could duplicate the
> built-in notify admincc action, and came up with this custom action prep
> scrip:
> 
> my $ScripActionObj = $self->ScripActionObj;
> $ScripActionObj->Load('Notify', $self->TemplateObj->Id);
> $ScripActionObj->SetExecModule('Notify');
> $ScripActionObj->SetArgument('AdminCc');
> $ScripActionObj->LoadAction(TransactionObj => $self->TransactionObj,
>                             TicketObj => $self->TicketObj);
> return($ScripActionObj->Prepare);
> 
> but it doesn't work right.

Okay, I think I found my mistake.  I was missing an argument when
calling LoadAction:  ScripObj => $self->ScripObj

After adding that, it seems to work right.  Is this the right way to
replicate the built-in "Notify AdminCcs" Action with your own custom
scrip action?

~Jason


-- 
/------------------------------------------------------------------\
|  Jason A. Smith                          Email:  [email protected] |
|  Atlas Computing Facility, Bldg. 510M    Phone: +1-631-344-4226  |
|  Brookhaven National Lab, P.O. Box 5000  Fax:   +1-631-344-7616  |
|  Upton, NY 11973-5000,  U.S.A.                                   |
\------------------------------------------------------------------/

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22 & 23
Dublin, Ireland - Mar 15 & 16
Boston, MA, USA - April 5 & 6
Washington DC, USA - Oct 25 & 26

Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to