[rt-users] Using Scrips assign CustomFields to incoming Tickets (from a pre-defined list of Custom Fields)
Behzad Mahini
bmahini at apple.com
Fri Aug 26 14:38:09 EDT 2011
Thanks Payam,
But that's not the reason (though I tried & created another Scrip for the "On Create" condition as well, and that did not make any difference........ Currently:
1) my emails do come into RT,
2) a Ticket gets generated (or an already created Ticket's content gets updated)
3) However, the Custom Field for the Ticket never gets updated
Trouble is, my Scrip is not even being seen by RT...and since I am not familiar with all the objects, my guess is I am calling the wrong object [i.e., (LoadByName(Name => $cf_key) could potentially be the wrong call for setting a Custom Field of incoming Tickets]:
#Custom Field Name to be Set
my $cf = RT::CustomField->new(RT->SystemUser);
#Set Ticket's CustomField, based on Subject line!
foreach $cf_key (keys %cf_hash)
if ( $t_subject =~ /$cf_key/i ) {
$cf->LoadByName(Name => $cf_key;
}
..Again, my Custom Fields are already defined (about 10 of them). All I need to do is to Update a new Ticket with the proper Custom Field, based on the Subject line of the Ticket.
Thanks,
Behzad
On Aug 26, 2011, at 5:30 AM, Payam Poursaied wrote:
> Hi Behzad
> As you mentioned, you want to update both on create and correspond. The scip parameters says it would only trigger on correspond
> Have you tried to modify the condition to “On Create” or clone this scrip and change the condition of new one to “On Create”
>
> I didn’t go through your code but that condition make sense
>
>
> My code below (Scrip) simply parses the Subject line of incoming tickets, and "should" attempt to create (& update) an incoming Ticket based on what shows up in the Subject line.
>
> Problem:
>
> Tickets do get created as I send my emails to RT, yet they do not get set with the Custom Field (from a pre-defined set of custom fields), and Custom Field stays as "no value"
>
> A) my Scrip parameters (using the web interface)
> ======================================
> Scrip Description: OnCreateAddCF
> Condition: On Correspond
> Action: User Defined
> Template: Correspondence-XYZ
> Stage: TransactionCreate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110826/bbacf5f0/attachment.htm>
More information about the rt-users
mailing list