[rt-users] Correspondence scrip help
Jonathan Chen
JChen at paymentone.com
Wed Aug 18 11:59:35 EDT 2004
Ok, still working on the same issue as yesterday. I think I just need a few lines of code to get this
if ($tr->Type eq 'Correspond' && $tr->NewValue ne 'resolved')
test condition to work. Currently its not working because Correspond and NewValue condition are not on the same line according to Transactions table on RT3 DB(See Below).
2689 0 305 0 Correspond NULL NULL NULL No Subject 33
2004-08-17 22:57:11
2690 0 305 0 Status Status open resolved NULL 33
2004-08-17 22:57:13
So how would I write a condition to check the NEXT line too?
-----Original Message-----
From: rt-users-bounces at lists.bestpractical.com [mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Jonathan Chen
Sent: Tuesday, August 17, 2004 4:25 PM
To: RT-Users at lists.bestpractical.com
Subject: [rt-users] Correspondence scrip help
Hello all,
I am wondering if there is any way to resolve RT action when TECH-1 resolves a ticket with correspondence it will not send out 2 emails to the requestor. The 1st email says the ticket is resolved and the other is basically the same message but using the correspondence template instead of the resolved template.
I tried to use the code below to resolve my issue but its not working because RT sends out the email before my custom action can check if the new ticket value is resolved or not. I believe my scrip would work if status changed to resolve was done before correspondence. Is there any way to fix this?
Maybe changing from Stage: TransactionCreate to TransactionBatch would resolve my problem?
============================================================================
Tue Aug 17 15:57:11 2004 TECH-1 - Correspondence added
Tue Aug 17 15:57:13 2004 TECH-1 - Status changed from open to resolved
On Correspond
User Defined Notify Requestors and Ccs with template Correspondence
Custom Action:
my $tr = $self->TransactionObj;
if ($tr->Type eq ('Correspond' || 'Comment') && $tr->NewValue ne 'resolved') {
return(1);
} else {
return undef;
}
--------------------------------------------------------
This electronic mail message contains information belonging to PaymentOne, which may be confidential and/or legal privileged. The information is intended only for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, printing, copying, distribution, or the taking of any action in reliance on the contents of this electronically mailed information is strictly prohibited. If you receive this message in error, please immediately notify us by electronic mail and delete this message.
--------------------------------------------------------
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list