All,

   In 3.8.4, I am attempting to set up an approval queue.    The idea is that 
if a Custom Field named "Change Control" is set to value 'YES" then a new 
ticket will be created to gather the required approval.

   This is in queue "Monitoring".

   So, in the queue I have a Scrip:  Monitor:approval,  with a User Defined 
condition, Action is Create Tickets, Template is Monitor:Approval, Stage 
TransactionComplete.
   My Custom Condition originally was:

if ($self->TransactionObj->Type ne "Create") {
  return 0; # This is an update transaction
}


my $CustomFields = $ticket->QueueObj->TicketCustomFields();
while (my $CustomField = $CustomFields->Next()) {
   if ($self->TicketObj->FirstCustomFieldValue('Change Control') =~ /Yes/i) {
   return 1;
}

return 0;


When that failed to do anything,  I just changed it to "return 1;".


My template is:

Subject: Approval of { $Tickets{'TOP'}->Subject() }
Queue: ___Approvals
Type : approval
Owner : slan...@hearstsc.com
Content : Please review and approve this request.
Depended-On-By : TOP



When I create a ticket and select YES for my CF, I see this in my log;  (note, 
my custom scrip is #84)


[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-747.239-...@hearstsc.com> #239/34524 - Scrip 3 On 
Create Autoreply To Requestors (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:302)
[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-747.239-...@hearstsc.com> sent  To: 
slan...@hearstsc.com (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:333)
[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-1595.239-...@hearstsc.com> #239/34524 - Scrip 4 On 
Create Notify AdminCcs (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:302)
[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-1595.239-...@hearstsc.com> No recipients found. Not 
sending. (/opt/rt3/bin/../lib/RT/Interface/Email.pm:338)
[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-1456.239-8...@hearstsc.com> #239/34524 - Scrip 82 On 
Create Notify CCs (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:302)
[Mon Sep 14 21:30:07 2009] [info]: 
<rt-3.8.4-3173-1252963807-1456.239-8...@hearstsc.com> sent  Cc: 
slan...@hearstsc.com (/opt/rt3/bin/../lib/RT/Action/SendEmail.pm:333)
[Mon Sep 14 21:30:07 2009] [info]: Ticket 239 created in queue 'Monitoring' by 
SLANDER (/opt/rt3/bin/../lib/RT/Ticket_Overlay.pm:667)


Can anyone see my mistake?  Or, am I going about this wrong?



------------------------------------------------------------------------------------
This e-mail message is intended only for the personal use of the recipient(s) 
named above. If you are not an intended recipient, you may not review, copy or 
distribute this message. If you have received this communication in error, 
please notify the Hearst Service Center (cad...@hearstsc.com) immediately by 
email and delete the original message.
------------------------------------------------------------------------------------
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Reply via email to