[Rt-commit] rt branch, 3.8-squelch-watchers-on-update, created. rt-3.8.7-48-g3622751
Kevin Falcone
falcone at bestpractical.com
Wed Dec 16 14:36:40 EST 2009
The branch, 3.8-squelch-watchers-on-update has been created
at 3622751b498b1e7a8c347aad04ac4dae7bd8ea20 (commit)
- Log -----------------------------------------------------------------
commit 8378a1bf2025a27768724795c7e40db01bd0e27d
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Dec 16 14:21:52 2009 -0500
Port CreateTicket's SkipNotification
This makes doing silent Updates possible as well
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index b4279fb..0eab90d 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1124,6 +1124,20 @@ sub ProcessUpdateMessage {
TimeTaken => $args{ARGSRef}->{'UpdateTimeWorked'}
);
+ my @temp_squelch;
+ foreach my $type (qw(Requestor Cc AdminCc)) {
+ if (grep $_ eq $type || $_ eq ( $type . 's' ), @{ $args{ARGSRef}->{'SkipNotification'} || [] }) {
+ push @temp_squelch, map $_->address, Email::Address->parse( $message_args{$type} );
+ my $watcher_method = $type eq 'Requestor' ? 'Requestors' : $type; # method consistency fail
+ push @temp_squelch, $args{TicketObj}->$watcher_method->MemberEmailAddresses;
+ }
+ }
+
+ if (@temp_squelch) {
+ require RT::Action::SendEmail;
+ RT::Action::SendEmail->SquelchMailTo( RT::Action::SendEmail->SquelchMailTo, @temp_squelch );
+ }
+
unless ( $args{'ARGSRef'}->{'UpdateIgnoreAddressCheckboxes'} ) {
foreach my $key ( keys %{ $args{ARGSRef} } ) {
next unless $key =~ /^Update(Cc|Bcc)-(.*)$/;
commit 3622751b498b1e7a8c347aad04ac4dae7bd8ea20
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Wed Dec 16 14:31:16 2009 -0500
New AfterUpdateType callback so you can add things to that row of an Update
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index d3c2a09..df85f0a 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -97,6 +97,7 @@
<option value="response" <% ($ARGS{'UpdateType'} && $ARGS{'UpdateType'} eq "response") ? qq[ selected="selected"] : !$ARGS{'UpdateType'}&&$ResponseDefault |n %>><&|/l&>Reply to requestors</&></option>
% }
</select>
+% $m->callback( %ARGS, CallbackName => 'AfterUpdateType' );
</td></tr>
<tr><td class="label"><&|/l&>Subject</&>:</td><td> <input name="UpdateSubject" size="60" value="<% $ARGS{UpdateSubject} || $TicketObj->Subject()%>" /></td></tr>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list