[Rt-commit] r12739 - in rt/branches/3.8-TESTING: lib/RT/Interface
elacour at bestpractical.com
elacour at bestpractical.com
Thu May 29 12:18:31 EDT 2008
Author: elacour
Date: Thu May 29 12:18:25 2008
New Revision: 12739
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
Log:
r9004 at datura: manu | 2008-05-29 18:18:09 +0200
RT-Ticket: 7764
RT-Status: resolved
RT-Update: correspond
Change corresponding reminders queue when we change a ticket queue.
Modified: rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm Thu May 29 12:18:25 2008
@@ -952,6 +952,7 @@
Queue
);
+ my @results;
if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) {
my $tempqueue = RT::Queue->new($RT::SystemUser);
@@ -961,12 +962,21 @@
}
}
+ # On queue change, change queue for reminders too
+ if ( $ARGSRef->{'Queue'} and ( $TicketObj->QueueObj->Id != $ARGSRef->{'Queue'} ) ) {
+ my $reminder_collection = $TicketObj->Reminders->Collection;
+ while ( my $reminder = $reminder_collection->Next ) {
+ my ($val, $msg) = $reminder->SetQueue($ARGSRef->{'Queue'});
+ push @results, $msg if ( !$val );
+ }
+ }
+
# Status isn't a field that can be set to a null value.
# RT core complains if you try
delete $ARGSRef->{'Status'} unless $ARGSRef->{'Status'};
- my @results = UpdateRecordObject(
+ push @results, UpdateRecordObject(
AttributesRef => \@attribs,
Object => $TicketObj,
ARGSRef => $ARGSRef,
More information about the Rt-commit
mailing list