[rt-users] Ticket Dependencies within Template
Speagle, Andy
Andy.Speagle at wichita.edu
Thu Jun 18 12:54:50 EDT 2009
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: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Speagle, Andy
Sent: Thursday, June 18, 2009 8:28 AM
To: rt-users at lists.bestpractical.com
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090618/05493ee6/attachment.htm>
More information about the rt-users
mailing list