[Rt-commit] rt branch, 3.999-trunk, updated. 1e4c960ee149b9897f48251bb61d261abeac8617
sartak at bestpractical.com
sartak at bestpractical.com
Tue Dec 1 05:13:34 EST 2009
The branch, 3.999-trunk has been updated
via 1e4c960ee149b9897f48251bb61d261abeac8617 (commit)
from ac45e1abf01262f3147960e0109a337be415929d (commit)
Summary of changes:
lib/RT/Action/UpdateTicket.pm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 1e4c960ee149b9897f48251bb61d261abeac8617
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Dec 1 05:12:32 2009 -0500
Change UpdateTicket queue logic to allow for disabled queues
Without this change, updating a ticket in a disabled queue will
silently change its queue. If we want to prevent updating tickets in
disabled queues, we need to be smarter anyway.
diff --git a/lib/RT/Action/UpdateTicket.pm b/lib/RT/Action/UpdateTicket.pm
index 22866c4..ff38f3d 100644
--- a/lib/RT/Action/UpdateTicket.pm
+++ b/lib/RT/Action/UpdateTicket.pm
@@ -97,11 +97,18 @@ sub _compute_possible_queues {
my $q = RT::Model::QueueCollection->new( current_user => $self->current_user );
$q->find_all_rows;
-
+
my $queues;
+
+ my $current_queue = $self->record->queue;
+ push @$queues, {
+ display => _('%1 (unchanged)', $current_queue->name),
+ value => $current_queue->id,
+ };
+
while (my $queue = $q->next) {
if ( $queue->current_user_has_right('CreateTicket')
- || $queue->id eq $self->record->queue->id )
+ && $queue->id ne $current_queue->id )
{
push @$queues, { display => $queue->name, value => $queue->id };
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list