update address standardization for cust_location changes
[freeside.git] / rt / lib / RT / Report / Tickets.pm
index c601485..de40dbd 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -69,7 +69,7 @@ sub Groupings {
     }
 
 
-    for my $field (qw(Due Resolved Created LastUpdated Started Starts)) {
+    for my $field (qw(Due Resolved Created LastUpdated Started Starts Told)) {
         for my $frequency (qw(Hourly Daily Monthly Annually)) {
             my $item = $field.$frequency;
             push @fields,  $item,  $item;
@@ -89,13 +89,7 @@ sub Groupings {
         foreach my $id (keys %$queues) {
             my $queue = RT::Queue->new( $self->CurrentUser );
             $queue->Load($id);
-            unless ($queue->id) {
-                # XXX TODO: This ancient code dates from a former developer
-                # we have no idea what it means or why cfqueues are so encoded.
-                $id =~ s/^.'*(.*).'*$/$1/;
-                $queue->Load($id);
-            }
-            $CustomFields->LimitToQueue($queue->Id);
+            $CustomFields->LimitToQueue($queue->Id) if $queue->Id;
         }
         $CustomFields->LimitToGlobal;
         while ( my $CustomField = $CustomFields->Next ) {
@@ -296,7 +290,7 @@ sub Next {
 
 sub NewItem {
     my $self = shift;
-    return RT::Report::Tickets::Entry->new($RT::SystemUser); # $self->CurrentUser);
+    return RT::Report::Tickets::Entry->new(RT->SystemUser); # $self->CurrentUser);
 }