On Mon, Apr 20, 2009 at 12:43, Jo Rhett <[email protected]> wrote:
> I find it very interesting that you can't see the requestor -- just
> the CC receipients of a ticket, when you reply to a ticket.  Is there
> a strong reason for this?
I would contend that the actual requestor oughn't really matter, and
that you could
always look at the display page before hitting reply, or use the Jumbo page.

Nevertheless, attached is a patch intended to solve a similar problem
for my users.
cp share/html/Ticket/Elements/PreviewScrips (v 3.8.1) to
local/html/Callbacks/Indirection/Ticket/Update.html/BeforeUpdateType && patch.
It could probably still stand a little pairing down though.
--- share/html/Ticket/Elements/PreviewScrips    2008-08-30 19:22:14.000000000 
-0400
+++ local/html/Callbacks/Indirection/Ticket/Update.html/BeforeUpdateType        
2009-04-20 13:04:16.000000000 -0400
@@ -50,48 +50,28 @@
 
 </%args>
 <%init>
+$TicketObj = $ARGS{TicketObj} = LoadTicket($ARGS{'id'});
+
 my %squelch = $m->comp('SELF:SquelchRecipients', %ARGS);
 my $Object = $squelch{'Object'};
-my @non_recipients = @{ $squelch{'EmailAddresses'} };
 
 </%init>
-<h2><&|/l&>This message will be sent to...</&></h2>
-
-% if ( $Object and $Object->Scrips ) {
-<i><&|/l&>(Check boxes to disable notifications to the listed 
recipients)</&></i><br />
 
+%# Explicit recipients
+% my %recip = map {$_=>[] } qw(To Cc Bcc);
+% #XXX $Object funkiness here, causes carg-culting....
 % foreach my $scrip (@{$Object->Scrips->Prepared}) {
-% next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
-<b><% $scrip->Description || loc('Scrip #[_1]',$scrip->id) %></b><br />
-<&|/l, loc($scrip->ConditionObj->Name), loc($scrip->ActionObj->Name), 
loc($scrip->TemplateObj->Name)&>[_1] [_2] with template [_3]</&>
-<br />
-%foreach my $type qw(To Cc Bcc) {
-%my @addresses =  $scrip->ActionObj->Action->$type();
-<ul>
-%foreach my $addr (@addresses) {
-<li> <b><%loc($type)%></b>: <input type="checkbox" class="checkbox" 
name="Ticket-<%$TicketObj->id%>-SquelchMailTo" value="<%$addr->address%>" /> 
<%$addr->address%>
-% }
-</ul>
-% }
-% if (RT->Config->Get('PreviewScripMessages')) {
-<textarea cols="80" rows="5">
-<%$scrip->ActionObj->TemplateObj->MIMEObj->as_string%>
-</textarea>
-% }
-% }
-% }
-<br />
-
-<h2><&|/l&>Messages about this ticket will not be sent to...</&></h2>
-<i><&|/l&>(Check boxes to enable notifications to the listed 
recipients)</&></i>
-<br />
-<ul>
-% foreach my $recipient (@non_recipients) {
-<li><input type="checkbox" class="checkbox" 
name="Ticket-<%$TicketObj->id%>-UnsquelchMailTo" 
value="<%$recipient->Content%>" />
-<% $recipient->Content %>
+%   next unless $scrip->ActionObj->Action->isa('RT::Action::SendEmail');
+%   foreach my $type (keys %recip) {
+%     push @{$recip{$type}}, $scrip->ActionObj->Action->$type();
+%   }
+% }
+% foreach my $type qw(To Cc Bcc) {
+<tr><td class="label" style="background-color:#eee"><% $type %>:</td>
+<td style="background-color:#eee"><% #map is necessary because there's no cmp
+       join(', ', sort map {"$_"} @{$recip{$type}}) %></td/>
+</tr>
 % }
-</ul>
-<& /Elements/Submit, Name => 'UpdatePreview', Value => 'UpdatePreview', Label 
=> loc('Save Changes')&>
 
 <%METHOD SquelchRecipients>
 <%ARGS>

<<attachment: screenshot.png>>

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]


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

Reply via email to