[rt-users] Custom Condition based on Transaction Custom Field value
MP
marton.peter at gmail.com
Sun Mar 6 15:02:18 EST 2005
Andy Harrison írta:
>On Sat, 5 Mar 2005 03:45:33 +0100, Péter Márton <marton.peter at gmail.com> wrote:
>
>
>Please explain the problem clearly and what you're trying to do. What
>does "Custom Condition based on Transaction Custom Field value" have
>to do with "$subject"?
>
>
Sorry, i was very tired.
I was able to make a scrip with a custom condition that checks the value
of a custom field:
(from the wiki:)
return undef unless ($self->TicketObj->FirstCustomFieldValue('Name_of_your_Custom_Field') =~ /matchtext/i);
return 1;
but (my problem is that) it checks only for "CustomField for queue", and i want to check a "Transaction Custom Field" value,
and if i fetch a TransactionObj (with $self->TransactionObj) it has only a CustomFieldValues. Hmmm...
So i tried this:
my $Ticket = $self->TransactionObj;
my $CustomFieldValues=$Ticket->CustomFieldValues;
while (my $CustomFieldValue = $CustomFieldValues->Next) {
$RT::Logger->error( ".CFV. ".$CustomFieldValue->Content );
}
But it logs nothing.
What should i do?
More information about the rt-users
mailing list