Self-Update,

> I can’t seem to get this right.  I have a template that creates a series of 
> child tickets that I want to be
> interdependent based on the value of one or more custom fields.  Everything 
> is working very well, save for
> actually creating the dependencies… here’s a bit of the relevant code:

I resolved this myself, by making the “Preconfigure” custom field mandatory and 
using this code…

{{{
Depended-On-By: {($Tickets{'TOP'}->FirstCustomFieldValue('Preconfigure') eq 
'Yes') ? "StepNetwork" : "StepTelecomm";}
}}}

I’m still a little weirded-out by the fact that the previous code didn’t 
succeed.

> {{{
> Depended-On-By: {
>   my $objDepTicket;
>
>   $objDepTicket = 'StepTelecomm' if ($strPre eq 'Yes');
>   $objDepTicket = 'TOP' if ($strPre eq 'No');
>
>   $objDepTicket;
> }
> }}}

It doesn’t seem significantly different… perhaps someone can clue me in to the 
relevant differences.

Thanks,

Andy Speagle

Rogue Unix Admin
Wichita State University

From: [email protected] 
[mailto:[email protected]] On Behalf Of Speagle, Andy
Sent: Thursday, June 18, 2009 8:28 AM
To: [email protected]
Subject: [rt-users] Ticket Dependencies within Template

Hi folks,

I can’t seem to get this right.  I have a template that creates a series of 
child tickets that I want to be interdependent based on the value of one or 
more custom fields.  Everything is working very well, save for actually 
creating the dependencies… here’s a bit of the relevant code:

{{{
===Create-Ticket: StepNetwork

.
.
.

Depended-On-By: {
  my $objDepTicket;

  $objDepTicket = $Tickets{'StepTelecomm'}->Id() if ($strPre eq 'Yes');
  $objDepTicket = $Tickets{'TOP'}->Id() if ($strPre eq 'No');

  $objDepTicket;
}

.
.
.

===Create-Ticket: StepTelecomm
}}}

I’ve tried this various ways… I can’t quite figure out how to reference the 
other tickets being created… or the parent ticket (aka TOP) for that matter… 
I’ve also tried the following unsuccessfully:

{{{
Depended-On-By: {
  my $objDepTicket;

  $objDepTicket = 'StepTelecomm' if ($strPre eq 'Yes');
  $objDepTicket = 'TOP' if ($strPre eq 'No');

  $objDepTicket;
}
}}}

Can anyone clue me in, please?...

Thanks,

Andy Speagle

Rogue Unix Admin
Wichita State University
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to