X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FPickTicketCFs;h=f67748b0f473625f0669639fd6a0b7d35cdf4e55;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hp=22650e837f7015963f690ed3e1fda0bbedc85c72;hpb=edd6f28f11fb048441b30c9d156e48cf4357774b;p=freeside.git diff --git a/rt/share/html/Search/Elements/PickTicketCFs b/rt/share/html/Search/Elements/PickTicketCFs index 22650e837..f67748b0f 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-2019 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 &>