Chris,<br><br>you're welcome. The neat (and sometimes confusing for perl beginners like me) thing is that with perl you can construct several different styles/techniques of code that all do the same thing.<br><br>Kenn<br>
<br><div class="gmail_quote">On Mon, Mar 5, 2012 at 3:17 PM, Chris Herrmann <span dir="ltr"><<a href="mailto:chrisherrmann7@gmail.com">chrisherrmann7@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Ken, I have it working now. I also found<br>
<a href="http://wiki-archive.bestpractical.com/view/CustomConditionSnippets" target="_blank">http://wiki-archive.bestpractical.com/view/CustomConditionSnippets</a><br>
which was very helpful - it actually has a specific example for what<br>
I'm trying to do. I have a couple of questions too... but first the<br>
answer:<br>
<br>
============================<br>
Condition: UserDefined<br>
Action: NotifyRequestors<br>
Template: MyTemplate<br>
Stage: TransactionCreate<br>
<br>
Custom Condition:<br>
my $Ticket = $self->TicketObj;<br>
<br>
# We want the Request Feedback CF<br>
my $TicketType = $Ticket->FirstCustomFieldValue('RequestFeedback');<br>
<br>
# We want resolved status<br>
return 0 unless $Ticket->Status eq "resolved";<br>
<br>
# and... we want the CF to be Y<br>
return 0 unless $TicketType eq 'Y';<br>
return 1;<br>
============================<br>
<br>
I tried a lot of different variations on the theme, along the lines of:<br>
return 0 if $cf->$self->TicketObj->FirstCustomFieldValue("RequestFeedback")<br>
eq "N";<br>
return 0 unless<br>
$cf->$self->TicketObj->FirstCustomFieldValue("RequestFeedback") eq "Y"<br>
return 0 unless<br>
$cf->$self->TicketObj->FirstCustomFieldValue('RequestFeedback') eq "Y"<br>
<br>
but these didn't return anything. I assume there's a problem with my<br>
syntax or how I'm referring to objects but couldn't work it out...<br>
luckily the page linked above has an example that has exactly what I'm<br>
after!<br>
<br>
In this case the scrip triggers if the ticket is reopened, then<br>
resolved again - for us this is OK but for others they might want to<br>
only trigger this condition the first time a ticket is resolved. I<br>
think you would need to use another CF to record the result of the<br>
transaction in this case (i.e. if successful then set<br>
CF-SentFeedbackRequest="y" or similar) and add an appropriate<br>
condition to check above... but for us it's not required.<br>
<br>
Thanks!<br>
<div class="HOEnZb"><div class="h5">--------<br>
RT Training Sessions (<a href="http://bestpractical.com/services/training.html" target="_blank">http://bestpractical.com/services/training.html</a>)<br>
* Boston  March 5 & 6, 2012<br>
</div></div></blockquote></div><br>