X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FPickTicketCFs;h=ada4a79c86c986c89ed1aa73289398a4c93f2512;hp=ac52049c38374830b24ab572899bd0725a55c2a3;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=919e930aa9279b3c5cd12b593889cd6de79d67bf diff --git a/rt/share/html/Search/Elements/PickTicketCFs b/rt/share/html/Search/Elements/PickTicketCFs index ac52049c3..ada4a79c8 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-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (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' ); <& PickCFs, %ARGS, TicketSQLField => 'CF', CustomFields => $CustomFields &>