Optimize "Customer has a referring customer" condition, RT#74452
[freeside.git] / httemplate / search / report_rt_ticket.html
index f0d7a42..7abc3e8 100644 (file)
@@ -6,15 +6,13 @@
 
   <% include ( '/elements/tr-input-beginning_ending.html' ) %>
 
-  <& /elements/tr-td-label.html, label => 'Time category:' &>
-  <TD>
-  <& /elements/select-rt-customfield.html,
-      name        => 'cfname',
-      lookuptype  => 'RT::Transaction',
-      valuetype   => 'TimeValue',
-      empty_label => 'Worked',
+  <& /elements/tr-select.html,
+      label       => 'Time category:',
+      field       => 'category',
+      options     => [ '', 'development', 'support' ],
+      option_labels => { '' => 'all' },
+      curr_value  => 'development',
   &>
-  </TD></TR>
 
   <% include ( '/elements/tr-select-otaker.html' ) %>
 
@@ -24,7 +22,7 @@
       <SELECT NAME="svcnum">
         <OPTION VALUE="">(all)
 %       foreach my $svc_acct (@svc_acct) {
-          <OPTION VALUE="<% $svc_acct->svcnum %>"><% $svc_acct->username %></OPTION>
+          <OPTION VALUE="<% $svc_acct->svcnum %>"><% $svc_acct->email %></OPTION>
 %       }
       </SELECT>
     </TD>
@@ -59,7 +57,6 @@ if ( @pkgparts ) {
 }
 
 # get a list of TimeValue-type custom fields
-RT::Init();
 my $CurrentUser = RT::CurrentUser->new();
 $CurrentUser->LoadByName($FS::CurrentUser::CurrentUser->username);
 die "RT not configured" unless $CurrentUser->id;
@@ -72,10 +69,4 @@ $CFs->Limit(FIELD => 'LookupType',
 $CFs->Limit(FIELD => 'Type',
             VALUE => 'TimeValue');
 
-my @time_fields = ('', 'Worked');
-while (my $CF = $CFs->Next) {
-  push @time_fields, $CF->Name, ($CF->Description || $CF->Name);
-}
-
-
 </%init>