[Rt-commit] r10705 - in rt/branches/3.999-DANGEROUS: . lib/RT/Model

jesse at bestpractical.com jesse at bestpractical.com
Sun Feb 3 18:44:52 EST 2008


Author: jesse
Date: Sun Feb  3 18:44:52 2008
New Revision: 10705

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
   rt/branches/3.999-DANGEROUS/t/ticket/pawsort.t
   rt/branches/3.999-DANGEROUS/t/ticket/requestor-order.t

Log:
 r76160 at pinglin:  jesse | 2008-02-03 18:42:38 -0500
 t/ticket/requestor_order.t
 r76161 at pinglin:  jesse | 2008-02-03 18:43:55 -0500
 * pawsort passes tests


Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	Sun Feb  3 18:44:52 2008
@@ -1442,7 +1442,7 @@
 
             push @res, { %$row, alias => $CFvs,      column => 'sort_order' };
             push @res, { %$row, alias => $TicketCFs, column => 'content' };
-        } elsif ( $field eq "Custom" && $subkey eq "ownership" ) {
+        } elsif ( $field eq "custom" && $subkey eq "ownership" ) {
 
             # PAW logic is "reversed"
             my $order = "ASC";

Modified: rt/branches/3.999-DANGEROUS/t/ticket/pawsort.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/pawsort.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/pawsort.t	Sun Feb  3 18:44:52 2008
@@ -82,11 +82,11 @@
 my $metx = RT::Model::TicketCollection->new( current_user => $cme );
 # Make sure we can sort in both directions on a queue specific field.
 $metx->from_sql(qq[queue="$queue"] );
-$metx->order_by( {column => "Custom.Ownership", order => 'ASC'} );
+$metx->order_by( {column => "custom.ownership", order => 'ASC'} );
 is($metx->count,6);
 check_order( $metx, qw[2 1 6 5 4 3]);
 
-$metx->order_by({ column => "Custom.Ownership", order => 'DESC'} );
+$metx->order_by({ column => "custom.ownership", order => 'DESC'} );
 is($metx->count,6);
 check_order( $metx, reverse qw[2 1 6 5 4 3]);
 
@@ -96,7 +96,7 @@
 my $youtx = RT::Model::TicketCollection->new( current_user => $cyou );
 # Make sure we can sort in both directions on a queue specific field.
 $youtx->from_sql(qq[queue="$queue"] );
-$youtx->order_by({ column => "Custom.Ownership", order => 'ASC'} );
+$youtx->order_by({ column => "custom.ownership", order => 'ASC'} );
 is($youtx->count,6);
 check_order( $youtx, qw[4 3 6 5 2 1]);
 

Modified: rt/branches/3.999-DANGEROUS/t/ticket/requestor-order.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/requestor-order.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/requestor-order.t	Sun Feb  3 18:44:52 2008
@@ -64,18 +64,18 @@
 {
     my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
     $tix->from_sql("Queue = '$queue' AND subject = 'first test' AND Requestor.email LIKE 'example.com'");
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     check_emails_order($tix, 5, 'ASC');
-    $tix->order_by({ column => "Requestor.email", order => 'DESC' });
+    $tix->order_by({ column => "requestor.email", order => 'DESC' });
     check_emails_order($tix, 5, 'DESC');
 }
 
 {
     my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
     $tix->from_sql("Queue = '$queue' AND subject = 'first test'");
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     check_emails_order($tix, 6, 'ASC');
-    $tix->order_by({ column => "Requestor.email", order => 'DESC' });
+    $tix->order_by({ column => "requestor.email", order => 'DESC' });
     check_emails_order($tix, 6, 'DESC');
 }
 
@@ -83,9 +83,9 @@
 {
     my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
     $tix->from_sql("Queue = '$queue' AND subject = 'first test'");
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     check_emails_order($tix, 6, 'ASC');
-    $tix->order_by({ column => "Requestor.email", order => 'DESC' });
+    $tix->order_by({ column => "requestor.email", order => 'DESC' });
     check_emails_order($tix, 6, 'DESC');
 }
 
@@ -113,16 +113,16 @@
     $tix->from_sql("Queue = '$queue' AND subject = 'first test'");
 TODO: {
     local $TODO = "if group has non users members we get wrong order";
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     check_emails_order($tix, 7, 'ASC');
 }
-    $tix->order_by({ column => "Requestor.email", order => 'DESC' });
+    $tix->order_by({ column => "requestor.email", order => 'DESC' });
     check_emails_order($tix, 7, 'DESC');
 
 {
     my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
     $tix->from_sql("Queue = '$queue'");
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     $tix->rows_per_page(30);
     my @mails;
     while (my $t = $tix->next) { push @mails, $t->requestor_addresses; }
@@ -133,7 +133,7 @@
 {
     my $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
     $tix->from_sql("Queue = '$queue'");
-    $tix->order_by({ column => "Requestor.email" });
+    $tix->order_by({ column => "requestor.email" });
     $tix->rows_per_page(30);
     my @mails;
     while (my $t = $tix->next) { push @mails, $t->requestor_addresses; }


More information about the Rt-commit mailing list