[rt-users] Scrip condition, "On XxxxCustomFieldChanged"
Ruslan Zakirov
ruz at bestpractical.com
Thu May 19 15:49:03 EDT 2011
Hi,
my $cf_obj = $self->TicketObj->LoadCustomFieldByIdentifier("Summary");
On Thu, May 19, 2011 at 11:36 PM, Daniel Schwager
<Daniel.Schwager at dtnet.de> wrote:
> Hi,
>
> is there a change to get the custom field id by the CF name ?
>
> my $fieldId =
> $self->TransactionObj->getCustomFieldIdByName("CF-Summary");
>
> I would like to replace the field number with the name
> to make the code more robust.
>
> -- <scrip> ----
>
> ### Trigger if custom value changed
> return undef unless ( $self->TransactionObj->Type =~ /CustomField/i );
>
> # Field 29: "CF-Summary"
> # my $fieldId = $self->TransactionObj-> getCustomFieldIdByName
> ("CF-Summary");
> my $fieldId = 29;
> return undef unless ( $self->TransactionObj->Field == $fieldId );
>
> -- </scrip> ----
>
> Kind regards
> Danny
>
>
--
Best regards, Ruslan.
More information about the rt-users
mailing list