[Rt-commit] rt branch, create-action, updated. ab6fde25aa05257dabe306bd9f6ed94c36c5b6c9
sartak at bestpractical.com
sartak at bestpractical.com
Thu Sep 3 08:20:23 EDT 2009
The branch, create-action has been updated
via ab6fde25aa05257dabe306bd9f6ed94c36c5b6c9 (commit)
from 64a664e9c397083808239253ef73573eb309836a (commit)
Summary of changes:
lib/RT/Action/CreateTicket.pm | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
- Log -----------------------------------------------------------------
commit ab6fde25aa05257dabe306bd9f6ed94c36c5b6c9
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Thu Sep 3 08:20:16 2009 -0400
Various cleanup and fixes
diff --git a/lib/RT/Action/CreateTicket.pm b/lib/RT/Action/CreateTicket.pm
index c34da8b..9b8dd4b 100644
--- a/lib/RT/Action/CreateTicket.pm
+++ b/lib/RT/Action/CreateTicket.pm
@@ -39,31 +39,31 @@ sub set_valid_owners {
my $queue = shift;
my $isSU = Jifty->web->current_user->has_right(
- right => 'SuperUser',
+ right => 'SuperUser',
object => RT->system,
);
my $users = RT::Model::UserCollection->new;
$users->who_have_right(
- right => 'OwnTicket',
- object => $queue,
+ right => 'OwnTicket',
+ object => $queue,
include_system_rights => 1,
- include_superusers => $isSU,
+ include_superusers => $isSU,
);
my %user_uniq_hash;
while (my $user = $users->next) {
- # skip nobody here, so we can make them first later
- next if $user->id == RT->nobody->id;
-
$user_uniq_hash{ $user->id } = $user;
}
+ # delete nobody here, so we can make them first later
+ delete $user_uniq_hash{RT->nobody->id};
+
my @valid_owners = sort { uc( $a->name ) cmp uc( $b->name ) }
values %user_uniq_hash;
unshift @valid_owners, RT->nobody;
- $self->{_cached_arguments}{status}{valid_values} = \@valid_owners;
+ $self->{_cached_arguments}{owner}{valid_values} = \@valid_owners;
}
1;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list