[rt-users] Change queue with a scrip before ticket creation.
Jason A. Smith
smithj4 at bnl.gov
Tue Mar 9 15:59:19 EST 2010
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. When I test it I get a message like this in
my RT logs:
RT: Scrip Commit 4 died. - Can't call method "id" on an undefined value
at /usr/lib/perl5/vendor_perl/5.8.8/RT/Action/SendEmail.pm line 300.
Stack: ....
Any ideas on what I am doing wrong and how I can get it to work
correctly?
Thanks,
~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/20100309/c1e58587/attachment.bin>
More information about the rt-users
mailing list