summaryrefslogtreecommitdiff
path: root/rt/share/html/Search/Elements/PickCFs
diff options
context:
space:
mode:
Diffstat (limited to 'rt/share/html/Search/Elements/PickCFs')
-rw-r--r--rt/share/html/Search/Elements/PickCFs14
1 files changed, 4 insertions, 10 deletions
diff --git a/rt/share/html/Search/Elements/PickCFs b/rt/share/html/Search/Elements/PickCFs
index 5d16b9c35..1c9f2a918 100644
--- a/rt/share/html/Search/Elements/PickCFs
+++ b/rt/share/html/Search/Elements/PickCFs
@@ -2,7 +2,7 @@
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -49,14 +49,6 @@
<& ConditionRow, Condition => $_ &>
% }
<%INIT>
-my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
-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;
-}
-$CustomFields->LimitToGlobal;
$m->callback(
CallbackName => 'MassageCustomFields',
CustomFields => $CustomFields,
@@ -66,7 +58,7 @@ $m->callback(
my @lines;
while ( my $CustomField = $CustomFields->Next ) {
my %line;
- $line{'Name'} = "'CF.{" . $CustomField->Name . "}'";
+ $line{'Name'} = "'$TicketSQLField.{" . $CustomField->Name . "}'";
$line{'Field'} = $CustomField->Name;
# Op
@@ -120,4 +112,6 @@ $m->callback( Conditions => \@lines, Queues => \%queues );
<%ARGS>
%queues => ()
+$CustomFields
+$TicketSQLField => 'CF'
</%ARGS>