[Rt-commit] r12741 - in rt/branches/3.8-TESTING: . lib/RT/Interface
elacour at bestpractical.com
elacour at bestpractical.com
Thu May 29 12:44:24 EDT 2008
Author: elacour
Date: Thu May 29 12:44:23 2008
New Revision: 12741
Modified:
rt/branches/3.8-TESTING/ (props changed)
rt/branches/3.8-TESTING/lib/RT/Interface/Web.pm
rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
Log:
r9006 at datura: manu | 2008-05-29 18:44:17 +0200
Move the reminder queue change to RT::Ticket::SetQueue
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:44:23 2008
@@ -952,7 +952,6 @@
Queue
);
- my @results;
if ( $ARGSRef->{'Queue'} and ( $ARGSRef->{'Queue'} !~ /^(\d+)$/ ) ) {
my $tempqueue = RT::Queue->new($RT::SystemUser);
@@ -962,21 +961,12 @@
}
}
- # 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'};
- push @results, UpdateRecordObject(
+ my @results = UpdateRecordObject(
AttributesRef => \@attribs,
Object => $TicketObj,
ARGSRef => $ARGSRef,
Modified: rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.8-TESTING/lib/RT/Ticket_Overlay.pm Thu May 29 12:44:23 2008
@@ -1703,6 +1703,12 @@
$RT::Logger->error("Couldn't set owner on queue change: $msg") unless $status;
}
+ # On queue change, change queue for reminders too
+ my $reminder_collection = $self->Reminders->Collection;
+ while ( my $reminder = $reminder_collection->Next ) {
+ return ( 0, $self->loc("Queue change failed for reminder [_1]: [_2]", $reminder->Id ,$msg) ) unless $val;
+ }
+
return ( $self->_Set( Field => 'Queue', Value => $NewQueueObj->Id() ) );
}
More information about the Rt-commit
mailing list