[rt-users] Mute notify requestor on resolve? (almost got it!)
Roman Massey
romanmassey at gmail.com
Wed Mar 25 13:11:14 EDT 2015
Hello,
I’m looking for help with “Mute notify requestor on resolve". I pieced something together from previous threads but I’m missing the last piece of the puzzle.
I have implemented this through a custom field and custom scrip and it is working. I’m also using the “edit custom field on reply/comment” extension. Works perfect if I change “Notify requestor on resolve?” to “No”, click update, then resolve; no email gets sent. HOWEVER I’d like to do this in one fell swoop, so..
Here is the issue: if I try to set the custom field “Notify requestor on resolve?” to “No” and change the status to “Resolved” at the same time, the resulting ticket history shows in this order:
1. Ticket changed to resolved.
2. Outgoing email recorded.
3. Notify requestor on resolve? changed to “No”.
Custom condition for Notify requestor on resolve scrip:
my $txn = $self->TransactionObj;
my $type = $txn->Type;
return 0 unless $type eq "Status"
|| ( $type eq 'Set' && $txn->Field eq 'Status');
return 0 unless $txn->NewValue eq "resolved";
return 0 if $self->TicketObj->FirstCustomFieldValue("Notify requestor on resolve?") eq "No";
return 1;
Any tips will be greatly appreciated. Thanks!
--
Roman Massey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150325/34959e72/attachment.htm>
More information about the rt-users
mailing list