[rt-users] Change queue with a scrip before ticket creation.
Jason A. Smith
smithj4 at bnl.gov
Fri Mar 12 15:13:31 EST 2010
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: smithj4 at bnl.gov |
| 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. |
\------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3971 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100312/ee3f1b6d/attachment.bin>
More information about the rt-users
mailing list