[rt-users] conditional template usage

Ruslan Zakirov ruslan.zakirov at gmail.com
Tue May 16 16:44:39 EDT 2006


I think easiest way is to create two scrips. As I can see you couldn't
change template from condition.

On 5/16/06, Bloom, Craig <Craig.Bloom at blackrock.com> wrote:
>
>
>
>
> I am trying to create a script with a custom condition that runs upon ticket
> creation.  Depending on the value of a user-defined field, the scrip should
> use one template or another.
>
>
>
> So far, in my Custom Condition I have:
>
>
>
> if ($self->TransactionObj->Type eq "Create"){
>
> if ($self->TicketObj->FirstCustomFieldValue('Parent
> Company') eq 'MY_COMPANY'){
>
> # LOAD TEMPLATE #
>
> } else {
>
> # LOAD DIFFERENT TEMPLATE #
>
> }
>
> return 1;
>
> }
>
> else{
>
> return undef;
>
> }
>
>
>
> Does this look right?  What do I need to add in place of "# LOAD TEMPLATE #"
> to get the scrip to load a template?
>
>
>
> Thanks,
>  Craig
>
>
>  THE INFORMATION CONTAINED IN THIS MESSAGE AND ANY ATTACHMENT MAY BE
> PRIVILEGED, CONFIDENTIAL, PROPRIETARY OR OTHERWISE PROTECTED FROM
> DISCLOSURE. If the reader of this message is not the intended recipient, you
> are hereby notified that any dissemination, distribution, copying or use of
> this message and any attachment is strictly prohibited. If you have received
> this message in error, please notify us immediately by replying to the
> message and permanently delete it from your computer and destroy any
> printout thereof.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>
> We're hiring! Come hack Perl for Best Practical:
> http://bestpractical.com/about/jobs.html
>
>


-- 
Best regards, Ruslan.


More information about the rt-users mailing list