[rt-users] Scrip for adding to the custom field based on another CF

Kevin Squire gentgeen at wikiak.org
Wed Jan 21 19:30:02 EST 2015


Such an elegant solution - thank you.


> This can be done with one ternary operator:
> my $value = $self->TicketObj->FirstCustomFieldValue('RMA Type') eq
> 'Student Withdrawl' ? "RMA-" . $Num : "RMA-" . $Num . $Append;
>
> Some notes:
> - The condition here is:  $self->TicketObj->FirstCustomFieldValue('RMA
> Type') eq 'Student Withdrawl'
> - If the condition is true then $value will equal what's between the ? and
> the : (colon)
> - If the condition is false then $value will equal what's between the :
> and the ; (semi-colon)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150121/0d3b3ede/attachment.htm>


More information about the rt-users mailing list