Silent Resolve (MuteResolve ReRedux)

From Request Tracker Wiki
Revision as of 18:39, 30 August 2011 by 128.117.193.58 (talk) (Created page with "Okay, this wiki is by far the worst wiki software I've ever seen. I can't for the life of me figure out how to get this article to format, so I'm leaving it as-is. Just edit this...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Okay, this wiki is by far the worst wiki software I've ever seen. I can't for the life of me figure out how to get this article to format, so I'm leaving it as-is. Just edit this page, click the source button on the right of the terrible WYSIWYG editor and copy and paste that into a text editor on your local box. Then read the article. Sorry 'bout the trouble, but I wanted to post this because I think it's a really good solution. Why do they make it so hard to contribute.

I couldn't get either the MuteResolve or MuteResolve Redux solutions to work, so here's mine. It seems to work well and is simpler. Tested with RT 4.0.2, but sould probably work with 3.x versions as well.

1) Create a Ticket Custom Field called Silent Resolve. (Tools->Configuration->Custom Fields->Create) Name: SilentResolve Type: Select one value Render Type: List (you may have to save it before this option appears) Values: Sort=0, Name='Yes'

2) Select it under Tools->Configuration->Global->Custom Fields->Tickets. (Why the two-step process beats me, especially when they have an Enabled checkbox on the field definition in step 1)

3) Create a new Global Template (Your mail server should route nobody@ to /dev/null) Name: Resolved (Check Silent)


Type: Perl



Content:


{
$nobody = 'nobody@localhost';
if ($Ticket->FirstCustomFieldValue('SilentResolve') eq 'Yes') {
"To: $nobody\nCc: $nobody\nBcc: $nobody\n";
} else {
;
}
}Subject: Resolved: {$Ticket->Subject}


According to our records, your request has been resolved. If you have any
further questions or concerns, please respond to this message.

Note that the "}Subject" is not a typo. You need it like that to make sure all that stuff is part of the e-mail header.

4) Set the "On Resolve Notify Requestors" scrip (Tools->Configuration->Global->Scrips->Select) to use this template.

5) Create a new scrip. (Tools->Configuration->Global->Scrips->Select)
Name: Unset Silent Resolve
Condition: On Reopen
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate
Custom Condition: return ($self->TicketObj->FirstCustomFieldValue('SilentResolve') eq 'Yes' ? 1 : 0);
Custom action preperation code:
$self->TicketObj->DeleteCustomFieldValue( Field => 'SilentResolve', Value => 'Yes');
$RT::Logger->info("Silent Resolve unset on Reopen of ticket ".$self->TicketObj->id);
return 1;
  1. End Custom action preperation code