summaryrefslogtreecommitdiff
path: root/rt/html/Search/Elements/PickCFs
diff options
context:
space:
mode:
Diffstat (limited to 'rt/html/Search/Elements/PickCFs')
-rw-r--r--rt/html/Search/Elements/PickCFs31
1 files changed, 20 insertions, 11 deletions
diff --git a/rt/html/Search/Elements/PickCFs b/rt/html/Search/Elements/PickCFs
index 435a07ad3..fb143ba57 100644
--- a/rt/html/Search/Elements/PickCFs
+++ b/rt/html/Search/Elements/PickCFs
@@ -1,8 +1,8 @@
-%# BEGIN BPS TAGGED BLOCK {{{
+%# {{{ BEGIN BPS TAGGED BLOCK
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC
%# <jesse@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@ -42,17 +42,24 @@
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
-%# END BPS TAGGED BLOCK }}}
+%# }}} END BPS TAGGED BLOCK
% while ( my $CustomField = $CustomFields->Next ) {
-% my $name = "'CF.{" . $CustomField->Name . "}'";
-<tr><td class="label">
+<tr><td class=label>
+
+% my $name;
+% if ($CustomField->QueueObj->id) {
+% $name = "'CF." . $CustomField->QueueObj->Name .
+% ".{" . $CustomField->Name . "}'";
+% } else {
+% $name = "'CF." . $CustomField->Name . "'";
+% }
<% $CustomField->Name %>
</td>
<td>
- <& /Elements/SelectCustomFieldOperator, Name => $name . "Op",
- True => loc("is"),
- False => loc("isn't"),
- TrueVal=> '=', FalseVal => '!=' &>
+<& /Elements/SelectCustomFieldOperator, Name => $name . "Op",
+ True => loc("is"),
+ False => loc("isn't"),
+ TrueVal=> '=', FalseVal => '!=' &>
</td>
<td>
<& /Elements/SelectCustomFieldValue, Name => "ValueOf" . $name,
@@ -60,11 +67,13 @@
&>
</td></tr>
% }
+
<%INIT>
my $CustomFields = RT::CustomFields->new( $session{'CurrentUser'});
-foreach my $id (keys %cfqueues) {
+foreach (keys %cfqueues) {
+ my $id = $_;
$id =~ s/^.'*(.*).'*$/$1/;
- # Gotta load up the $queue object, since queues get stored by name now. my $id
+ # 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);