[rt-users] Passing through values in a scrip
Jonathan Rummel
jrummel at imapp.com
Tue Jan 5 19:14:40 EST 2010
Hi all,
I have a scrip to auto-create a dependent ("child") ticket that I have
posted below. The newly created ticket will have the same custom field
('Progress') as the ticket it depends on. I would like the newly created
ticket's 'Progress' custom field to have the same value as it's "parent"
ticket has in the same custom field. Essentially, I want to pass a value
from the "parent" ticket to the "child" ticket. Can anyone help me out with
this and tell me how to incorporate it into the below code? I'm really
stuck here! Thanks so much!
Custom condition:
if ($self->TicketObj->FirstCustomFieldValue('Progress') eq 'Request Data') {
return 1;
}
return 0;
Custom action preparation code:
return 1;
Custom action cleanup code:
my $trans = $self->TransactionObj;
my $tkt = $self->TicketObj;
my $requestors = [ $tkt->Requestors->MemberEmailAddresses];
my $new_tkt = RT::Ticket->new($RT::SystemUser); my ($id, $msg) =
$new_tkt->Create(
Queue => "Data Analysis",
Subject => $tkt->Subject . " (child ticket)",
Owner => "test",
Status => 'new',
Requestor => $requestors,
DependedOnBy => $tkt->Id);
return 1;
--
View this message in context: http://old.nabble.com/Passing-through-values-in-a-scrip-tp27026744p27026744.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.
More information about the rt-users
mailing list