I'm having some issues getting a scrip I wrote to run in RT 4.2.2. I am attempting to populate some custom fields from XML in an email submitted ticket but in the process of troubleshooting, I noticed that the scrip itself was not being traversed when email tickets are being submitted. The tickets are created and the autoreply goes out just fine, but my scrip with the same On Create condition does not execute. These are the debug logs showing the scrips that run On Create and the code for my custom Scrip, which is number 16. * Debug Logs:* /Feb 11 16:16:30 vector RT: [22799] <[email protected]> #105/703 - Scrip 7 On Create Autoreply To Requestors Feb 11 16:16:30 vector RT: [22799] <[email protected]> sent To: ***************** Feb 11 16:16:30 vector RT: [22799] <[email protected]> #105/703 - Scrip 8 On Create Notify Owner and AdminCcs Feb 11 16:16:30 vector RT: [22799] <[email protected]> No recipients found. Not sending. Feb 11 16:16:30 vector RT: [22799] <[email protected]> #105/703 - Scrip 9 On Create Notify Ccs Feb 11 16:16:30 vector RT: [22799] <[email protected]> No recipients found. Not sending. Feb 11 16:16:30 vector RT: [22799] <[email protected]> #105/703 - Scrip 10 On Create Notify Other Recipients Feb 11 16:16:30 vector RT: [22799] <[email protected]> No recipients found. Not sending. Feb 11 16:16:30 vector RT: [22799] Ticket 105 created in queue 'DMCA' by **************/
*Scrip:* Conditon: On Create Action: User Defined Template: Blank User Defined Conditions and Results: Custom Conditon: <empty> Custom Action Preperation Code: /return 1;/ Custom Action Commit Code: /# Get the current transaction and ticket objects my $transaction = $self->TransactionObj; my $ticket = $self->TicketObj; # Create the Custom Field and specify the name my $cf_obj = RT::CustomField->new($RT::SystemUser); my $cf_name = "Case ID"; my $content = $transaction->Content; my $cf_value = $content =~ /<ID>(.*)<\/ID>/; RT::Logger->debug($cf_value); #RT::Logger->debug($cf_obj->Name); $cf_obj->LoadByName(Name=>$cf_name); $ticket->AddCustomFieldValue(Field=>$cf_obj, Value=>$cf_value); return 1; / I have tried to simply put "return 1;" in both the prep and commit code and still haven't had any luck getting this scrip to run. I am not really concerned with the parsing logic at this point, I would just like to get it to trigger On Create. Here is the alias I am using to submit my tickets via the local PostFix install: /dmcanotices: "|/opt/rt4/bin/rt-mailgate --queue DMCA --action correspond --url https://192.168.160.xxx"/ Any help anyone can provide would be greatly appreciated. I am entering day 3 of this issue, and I'm out of ideas. -- View this message in context: http://requesttracker.8502.n7.nabble.com/User-Created-Scrip-Won-t-Run-On-Create-tp56616.html Sent from the Request Tracker - User mailing list archive at Nabble.com. -- RT Training London, March 19-20 and Dallas May 20-21 http://bestpractical.com/training
