What I’m trying to do:
When a specific user, id=1101 sends a request to RT I want it to create the ticket as normal, but also set a custom field during the creations process, ie the Severity custom field. Tickets from this specific user, 1101, will always be assigned the same severity value of 3. The scrip to do this seems pretty simple. The custom field is a select type, and normally a user creates the ticket on RT webUI and just selects this from the list. Now we have requests being emailed and need to set the custom field during the creation process. I didn’t create the custom field, but it looks like this:
Select 1 value:
1 Urgent - blahblah
2 High - blahblah
3 Medium - blahblah
4 Low - blahblah
blahblah being the description of each
my $transaction = $self->TransactionObj;
my $ticket = $self->TicketObj;
if (($transaction->Type eq ‘Create’) &&
($ticket->Creator == 1101))
$Ticket->FirstCustomFieldValue(‘Severity’) = ‘3’
This doesn’t work. Also tried setting it as ‘3 Medium - blahblah’. It seems that this isn’t the way to set the customfield.
After reading some posts on here it appears I have to create a custom field by hand and set it somehow.
my $cf = new RT::CustomField($RT::SystemUser);
$cf = ‘3 Medium blahblah’
#set a transaction object of type ‘CustomField’ to the value of $cf?
Is this how I would go about doing it? Am I on the right track here? Any help would be appreciated!
Lauren found her dream laptop. Find the PC that’s right for you.