[rt-users] Merging Custom Field Values

Rodney Rindels rrindels at gmail.com
Tue Apr 11 13:46:04 EDT 2006


Hello,
I've gotten a little ways here on defining a custom scrip that launches on
merge, not sure about if I can limit the queues like I'm doing though...
---condition---
my $txn = $self->TransactionObj;
return undef unless $txn->Type =~ /^AddLink$/i;
return undef unless $txn->Field =~ /^MergedInto$/i;
my @queues = qw(Enrollment/Recruitment Installation Accounting
HealthCheck/Follow-up);
my $queue = $txn->Queue;
my $qCount = grep(/\Q$queue\E/, at queues);
my $cfv = $self->TicketObj->FirstCustomFieldValue('Lead Source');
return undef if (length($cfv > 0));
return undef unless $qCount >= 1;
return 1;

My question is really when your merging two tickets, the
$self->TransactionObj is for which the ticket your merging from or the
ticket your merging into?
If so how do you get the other ticket in the transaction, so I can pull the
custom field values I need from it to set in the merged ticket, right now,
if you merge a ticket, into another, custom fields dont get merged. ...

Thanks in advance,

Rodney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060411/f3d64d26/attachment.html>


More information about the RT-Users mailing list