diff options
Diffstat (limited to 'rt/share/html/Search/Elements/PickTicketCFs')
-rw-r--r-- | rt/share/html/Search/Elements/PickTicketCFs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rt/share/html/Search/Elements/PickTicketCFs b/rt/share/html/Search/Elements/PickTicketCFs index 22650e837..ae3a4a286 100644 --- a/rt/share/html/Search/Elements/PickTicketCFs +++ b/rt/share/html/Search/Elements/PickTicketCFs @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -54,8 +54,11 @@ foreach my $id (keys %queues) { # Gotta load up the $queue object, since queues get stored by name now. my $queue = RT::Queue->new($session{'CurrentUser'}); $queue->Load($id); - $CustomFields->LimitToQueue($queue->Id) if $queue->Id; + next unless $queue->Id; + $CustomFields->LimitToQueue($queue->Id); + $CustomFields->SetContextObject( $queue ) if keys %queues == 1; } $CustomFields->LimitToGlobal; +$CustomFields->OrderBy( FIELD => 'Name', ORDER => 'ASC' ); </%init> <& PickCFs, %ARGS, TicketSQLField => 'CF', CustomFields => $CustomFields &> |