[Rt-commit] r10688 - in rt/branches/3.999-DANGEROUS: . html/Admin/Queues html/Approvals/Elements lib/RT/Interface lib/RT/Model t/web

jesse at bestpractical.com jesse at bestpractical.com
Sun Feb 3 13:46:04 EST 2008


Author: jesse
Date: Sun Feb  3 13:46:00 2008
New Revision: 10688

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/html/Admin/Queues/Modify.html
   rt/branches/3.999-DANGEROUS/html/Approvals/Elements/PendingMyApproval
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
   rt/branches/3.999-DANGEROUS/t/ticket/search.t
   rt/branches/3.999-DANGEROUS/t/web/cf_access.t
   rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t

Log:
 r76132 at pinglin:  jesse | 2008-02-03 13:42:59 -0500
 * 23 test scripts failing


Modified: rt/branches/3.999-DANGEROUS/html/Admin/Queues/Modify.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Queues/Modify.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Queues/Modify.html	Sun Feb  3 13:46:00 2008
@@ -161,7 +161,7 @@
     my @linkresults;
     $m->callback(
         results      => \@linkresults,
-        RecordObj    => $queue_obj,
+        record_obj    => $queue_obj,
         args_ref      => \%ARGS, 
         Callbackname => 'ProcessLinks'
     );

Modified: rt/branches/3.999-DANGEROUS/html/Approvals/Elements/PendingMyApproval
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Approvals/Elements/PendingMyApproval	(original)
+++ rt/branches/3.999-DANGEROUS/html/Approvals/Elements/PendingMyApproval	Sun Feb  3 13:46:00 2008
@@ -74,11 +74,11 @@
 
 <%init>
 my $tickets = RT::Model::TicketCollection->new();
-$tickets->limit_owner( value => Jifty->web->current_user->id );
+$tickets->limit( column => 'owner', value => Jifty->web->current_user->id );
 
 # also consider AdminCcs as potential approvers.
 my $group_tickets = RT::Model::TicketCollection->new();
-$group_tickets->limit_watcher( value => Jifty->web->current_user->user_object->email, type => 'AdminCc' );
+$group_tickets->limit_watcher( value => Jifty->web->current_user->user_object->email, type => 'admin_cc' );
 
 my $Created_before = RT::Date->new();
 my $Created_after = RT::Date->new();

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web.pm	Sun Feb  3 13:46:00 2008
@@ -374,7 +374,7 @@
             }
 
             if ( $arg =~ /-Upload$/ ) {
-                $create_args{"CustomField-$cfid"} = _uploaded_file($arg);
+                $create_args{"custom_field-$cfid"} = _uploaded_file($arg);
                 next;
             }
 
@@ -396,7 +396,7 @@
                 }
                 grep defined, @values;
 
-            $create_args{"CustomField-$cfid"} = \@values;
+            $create_args{"custom_field-$cfid"} = \@values;
         }
     }
 
@@ -780,9 +780,9 @@
 
 # }}}
 
-# {{{ sub UpdateRecordObj
+# {{{ sub update_record_obj
 
-=head2 UpdateRecordObj ( args_ref => \%ARGS, object => RT::Record, attributes_ref => \@attribs)
+=head2 update_record_obj ( args_ref => \%ARGS, object => RT::Record, attributes_ref => \@attribs)
 
 @attribs is a list of ticket fields to check and update if they differ from the  B<object>'s current values. args_ref is a ref to HTML::Mason's %ARGS.
 
@@ -1280,7 +1280,7 @@
             Value  => $args_ref->{ $field . '_Date' }
         );
 
-        my $obj = $field . "Obj";
+        my $obj = $field . "_obj";
         if (    ( defined $DateObj->unix )
             and ( $DateObj->unix != $Ticket->$obj()->unix() ) )
         {
@@ -1315,7 +1315,7 @@
     my $args_ref = $args{'args_ref'};
 
     my (@results)
-        = process_record_links( RecordObj => $Ticket, args_ref => $args_ref );
+        = process_record_links( record_obj => $Ticket, args_ref => $args_ref );
 
     #Merge if we need to
     if ( $args_ref->{ $Ticket->id . "-MergeInto" } ) {
@@ -1332,12 +1332,12 @@
 
 sub process_record_links {
     my %args = (
-        RecordObj => undef,
+        record_obj => undef,
         args_ref   => undef,
         @_
     );
 
-    my $Record  = $args{'RecordObj'};
+    my $Record  = $args{'record_obj'};
     my $args_ref = $args{'args_ref'};
 
     my (@results);

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm	Sun Feb  3 13:46:00 2008
@@ -651,9 +651,9 @@
             my ( $status, $msg ) = $self->add_custom_field_value(
                 (   UNIVERSAL::isa( $value => 'HASH' )
                     ? %$value
-                    : ( Value => $value )
+                    : ( value => $value )
                 ),
-                Field              => $cfid,
+                field              => $cfid,
                 record_transaction => 0,
             );
             push @non_fatal_errors, $msg unless $status;

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 13:46:00 2008
@@ -1520,62 +1520,6 @@
 
 # }}}
 
-=head2 FreezeLimits
-
-Returns a frozen string suitable for handing back to ThawLimits.
-
-=cut
-
-sub _freeze_thaw_keys {
-    'TicketRestrictions', 'restriction_index', 'looking_at_effective_id',
-        'looking_at_type';
-}
-
-# {{{ sub FreezeLimits
-
-sub freeze_limits {
-    my $self = shift;
-    require Storable;
-    require MIME::Base64;
-    MIME::Base64::Base64_encode(
-        Storable::freeze( \@{$self}{ $self->_freeze_thaw_keys } ) );
-}
-
-# }}}
-
-=head2 ThawLimits
-
-Take a frozen Limits string generated by FreezeLimits and make this tickets
-object have that set of limits.
-
-=cut
-
-# {{{ sub ThawLimits
-
-sub thaw_limits {
-    my $self = shift;
-    my $in   = shift;
-
-    #if we don't have $in, get outta here.
-    return undef unless ($in);
-
-    $self->{'RecalcTicketLimits'} = 1;
-
-    require Storable;
-    require MIME::Base64;
-
-    #We don't need to die if the thaw fails.
-    @{$self}{ $self->_freeze_thaw_keys }
-        = eval { @{ Storable::thaw( MIME::Base64::Base64_decode($in) ) }; };
-
-    Jifty->log->error($@) if $@;
-
-}
-
-# }}}
-
-# {{{ Limit by enum or foreign key
-
 # {{{ sub limit_Queue
 
 =head2 limit_Queue
@@ -1706,303 +1650,9 @@
 
 # }}}
 
-# {{{ Limit by string field
-
-# {{{ sub limit_subject
-
-=head2 limit_subject
-
-Takes a paramhash with the fields operator and value.
-operator is one of = or !=.
-value is a string to search for in the subject of the ticket.
-
-=cut
-
-sub limit_subject {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column   => 'subject',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('subject'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# }}}
-
-# {{{ Limit based on ticket numerical attributes
-# Things that can be > < = !=
-
-# {{{ sub limit_Id
-
-=head2 limit_Id
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a ticket id to search for
-
-=cut
-
-sub limit_id {
-    my $self = shift;
-    my %args = (
-        operator => '=',
-        @_
-    );
-
-    $self->limit(
-        column   => 'id',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('id'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_Priority
-
-=head2 limit_Priority
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a value to match the ticket\'s priority against
-
-=cut
-
-sub limit_priority {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column   => 'priority',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('Priority'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_initial_priority
-
-=head2 limit_initial_priority
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a value to match the ticket\'s initial priority against
-
-
-=cut
-
-sub limit_initial_priority {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column      => 'initial_priority',
-        value       => $args{'value'},
-        operator    => $args{'operator'},
-        description => join( ' ',
-            _('Initial Priority'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_final_priority
-
-=head2 limit_final_priority
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a value to match the ticket\'s final priority against
-
-=cut
-
-sub limit_final_priority {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column      => 'final_priority',
-        value       => $args{'value'},
-        operator    => $args{'operator'},
-        description => join( ' ',
-            _('Final Priority'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_time_worked
-
-=head2 limit_time_worked
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a value to match the ticket's time_worked attribute
-
-=cut
-
-sub limit_time_worked {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column   => 'time_worked',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('Time Worked'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_time_left
-
-=head2 limit_time_left
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, >, < or !=.
-value is a value to match the ticket's time_left attribute
-
-=cut
-
-sub limit_time_left {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column   => 'time_left',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('Time Left'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# }}}
-
-# {{{ limit_ing based on attachment attributes
-
-# {{{ sub limit_content
-
-=head2 limit_content
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, LIKE, NOT LIKE or !=.
-value is a string to search for in the body of the ticket
-
-=cut
-
-sub limitcontent {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column      => 'content',
-        value       => $args{'value'},
-        operator    => $args{'operator'},
-        description => join( ' ',
-            _('Ticket content'), $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# {{{ sub limit_Filename
-
-=head2 limit_Filename
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, LIKE, NOT LIKE or !=.
-value is a string to search for in the body of the ticket
-
-=cut
-
-sub limitfilename {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column      => 'filename',
-        value       => $args{'value'},
-        operator    => $args{'operator'},
-        description => join( ' ',
-            _('Attachment filename'),
-            $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-# {{{ sub limit_content_type
-
-=head2 limit_content_type
-
-Takes a paramhash with the fields operator and value.
-operator is one of =, LIKE, NOT LIKE or !=.
-value is a content type to search ticket attachments for
-
-=cut
-
-sub limit_content_type {
-    my $self = shift;
-    my %args = (@_);
-    $self->limit(
-        column      => 'content_type',
-        value       => $args{'value'},
-        operator    => $args{'operator'},
-        description => join( ' ',
-            _('Ticket content type'),
-            $args{'operator'}, $args{'value'}, ),
-    );
-}
-
-# }}}
-
-# }}}
-
-# {{{ limit_ing based on people
-
-# {{{ sub limit_owner
-
-=head2 limit_owner
-
-Takes a paramhash with the fields operator and value.
-operator is one of = or !=.
-value is a user id.
-
-=cut
-
-sub limit_owner {
-    my $self = shift;
-    my %args = (
-        operator => '=',
-        @_
-    );
-
-    my $owner = RT::Model::User->new();
-    $owner->load( $args{'value'} );
-
-    # FIXME: check for a valid $owner
-    $self->limit(
-        column   => 'owner',
-        value    => $args{'value'},
-        operator => $args{'operator'},
-        description =>
-            join( ' ', _('owner'), $args{'operator'}, $owner->name(), ),
-    );
-
-}
 
 # }}}
 
-# {{{ limit_ing watchers
-
-# {{{ sub limit_Watcher
 
 =head2 limit_Watcher
 
@@ -2214,216 +1864,6 @@
 
 # }}}
 
-# {{{ limit based on ticket date attribtes
-
-# {{{ sub limit_Date
-
-=head2 limit_Date (column => 'date_field', operator => $oper, value => $ISODate)
-
-Takes a paramhash with the fields column operator and value.
-
-operator is one of > or <
-value is a date and time in ISO format in GMT
-column is one of starts, Started, Told, Created, Resolved, LastUpdated
-
-There are also helper functions of the form limit_column that eliminate
-the need to pass in a column argument.
-
-=cut
-
-sub limit_date {
-    my $self = shift;
-    my %args = (
-        column   => undef,
-        value    => undef,
-        operator => undef,
-
-        @_
-    );
-
-    #Set the description if we didn't get handed it above
-    unless ( $args{'description'} ) {
-        $args{'description'}
-            = $args{'column'} . " "
-            . $args{'operator'} . " "
-            . $args{'value'} . " GMT";
-    }
-
-    $self->limit(%args);
-
-}
-
-# }}}
-
-sub limit_created {
-    my $self = shift;
-    $self->limit_date( column => 'created', @_ );
-}
-
-sub limit_due {
-    my $self = shift;
-    $self->limit_date( column => 'due', @_ );
-
-}
-
-sub limit_starts {
-    my $self = shift;
-    $self->limit_date( column => 'starts', @_ );
-
-}
-
-sub limit_started {
-    my $self = shift;
-    $self->limit_date( column => 'started', @_ );
-}
-
-sub limit_resolved {
-    my $self = shift;
-    $self->limit_date( column => 'resolved', @_ );
-}
-
-sub limit_told {
-    my $self = shift;
-    $self->limit_date( column => 'told', @_ );
-}
-
-sub limit_last_updated {
-    my $self = shift;
-    $self->limit_date( column => 'last_updated', @_ );
-}
-
-#
-# {{{ sub limit_TransactionDate
-
-=head2 limit_TransactionDate (operator => $oper, value => $ISODate)
-
-Takes a paramhash with the fields column operator and value.
-
-operator is one of > or <
-value is a date and time in ISO format in GMT
-
-
-=cut
-
-sub limit_transaction_date {
-    my $self = shift;
-    my %args = (
-        column   => 'transaction_date',
-        value    => undef,
-        operator => undef,
-
-        @_
-    );
-
-    #  <20021217042756.GK28744 at pallas.fsck.com>
-    #    "Kill It" - Jesse.
-
-    #Set the description if we didn't get handed it above
-    unless ( $args{'description'} ) {
-        $args{'description'}
-            = $args{'column'} . " "
-            . $args{'operator'} . " "
-            . $args{'value'} . " GMT";
-    }
-
-    $self->limit(%args);
-
-}
-
-# }}}
-
-# }}}
-
-# {{{ Limit based on custom fields
-# {{{ sub limit_CustomField
-
-=head2 limit_CustomField
-
-Takes a paramhash of key/value pairs with the following keys:
-
-=over 4
-
-=item customfield - CustomField name or id.  If a name is passed, an additional parameter queue may also be passed to distinguish the custom field.
-
-=item operator - The usual Limit operators
-
-=item value - The value to compare against
-
-=back
-
-=cut
-
-sub limit_custom_field {
-    my $self = shift;
-    my %args = (
-        value       => undef,
-        customfield => undef,
-        operator    => '=',
-        description => undef,
-        column      => 'custom_field_value',
-        quote_value => 1,
-        @_
-    );
-
-    warn "limit_ing to a cf";
-    my $CF = RT::Model::CustomField->new;
-    if ( $args{customfield} =~ /^\d+$/ ) {
-        $CF->load( $args{customfield} );
-    } else {
-        $CF->load_by_name_and_queue(
-            name  => $args{customfield},
-            queue => $args{queue}
-        );
-        $args{customfield} = $CF->id;
-    }
-
-    #If we are looking to compare with a null value.
-    if ( $args{'operator'} =~ /^is$/i ) {
-        $args{'description'}
-            ||= _( "Custom field %1 has no value.", $CF->name );
-    } elsif ( $args{'operator'} =~ /^is not$/i ) {
-        $args{'description'}
-            ||= _( "Custom field %1 has a value.", $CF->name );
-    }
-
-    # if we're not looking to compare with a null value
-    else {
-        $args{'description'} ||= _(
-            "Custom field %1 %2 %3", $CF->name,
-            $args{operator},         $args{value}
-        );
-    }
-
-    my $q = "";
-    if ( $CF->queue ) {
-        my $qo = RT::Model::Queue->new();
-        $qo->load( $CF->queue );
-        $q = $qo->name;
-    }
-
-    my @rest;
-    @rest = ( entry_aggregator => 'AND' )
-        if ( $CF->type eq 'SelectMultiple' );
-
-    warn "limit_ing  ";
-    $self->limit(
-        value  => $args{value},
-        column => "CF."
-            . (
-              $q
-            ? $q . ".{" . $CF->name . "}"
-            : $CF->name
-            ),
-        operator    => $args{operator},
-        customfield => 1,
-        @rest,
-    );
-
-    $self->{'RecalcTicketLimits'} = 1;
-}
-
-# }}}
-# }}}
 
 # {{{ sub _nextIndex
 
@@ -2565,104 +2005,6 @@
 
 # }}}
 
-# {{{ Deal with storing and restoring restrictions
-
-# {{{ sub loadRestrictions
-
-=head2 LoadRestrictions
-
-LoadRestrictions takes a string which can fully populate the TicketRestrictons hash.
-TODO It is not yet implemented
-
-=cut
-
-# }}}
-
-# {{{ sub DescribeRestrictions
-
-=head2 DescribeRestrictions
-
-takes nothing.
-Returns a hash keyed by restriction id.
-Each element of the hash is currently a one element hash that contains description which
-is a description of the purpose of that TicketRestriction
-
-=cut
-
-sub describe_restrictions {
-    my $self = shift;
-
-    my ( $row, %listing );
-
-    foreach $row ( keys %{ $self->{'TicketRestrictions'} } ) {
-        $listing{$row} = $self->{'TicketRestrictions'}{$row}{'description'};
-    }
-    return (%listing);
-}
-
-# }}}
-
-# {{{ sub RestrictionValues
-
-=head2 RestrictionValues column
-
-Takes a restriction field and returns a list of values this field is restricted
-to.
-
-=cut
-
-sub restriction_values {
-    my $self  = shift;
-    my $field = shift;
-    map $self->{'TicketRestrictions'}{$_}{'value'}, grep {
-               $self->{'TicketRestrictions'}{$_}{'column'}   eq $field
-            && $self->{'TicketRestrictions'}{$_}{'operator'} eq "="
-        }
-        keys %{ $self->{'TicketRestrictions'} };
-}
-
-# }}}
-
-# {{{ sub ClearRestrictions
-
-=head2 ClearRestrictions
-
-Removes all restrictions irretrievably
-
-=cut
-
-sub clear_restrictions {
-    my $self = shift;
-    delete $self->{'TicketRestrictions'};
-    $self->{'looking_at_effective_id'} = 0;
-    $self->{'looking_at_type'}         = 0;
-    $self->{'RecalcTicketLimits'}      = 1;
-}
-
-# }}}
-
-# {{{ sub deleteRestriction
-
-=head2 DeleteRestriction
-
-Takes the row id of a restriction (From DescribeRestrictions' output, for example.
-Removes that restriction from the session's limits.
-
-=cut
-
-sub delete_restriction {
-    my $self = shift;
-    my $row  = shift;
-    delete $self->{'TicketRestrictions'}{$row};
-
-    $self->{'RecalcTicketLimits'} = 1;
-
-    #make the underlying easysearch object forget all its preconceptions
-}
-
-# }}}
-
-# {{{ sub _RestrictionsToClauses
 
 # Convert a set of oldstyle SB Restrictions to Clauses for RQL
 

Modified: rt/branches/3.999-DANGEROUS/t/ticket/search.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/ticket/search.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/ticket/search.t	Sun Feb  3 13:46:00 2008
@@ -23,17 +23,17 @@
 my $cf = RT::Model::CustomField->new(current_user => RT->system_user);
 $cf->create(name => 'SearchTest', type => 'Freeform', MaxValues => 0, queue => $q->id);
 ok($cf->id, "Created the SearchTest CF");
-my $cflabel = "CustomField-".$cf->id;
+my $cflabel = "custom_field-".$cf->id;
 
 my $cf2 = RT::Model::CustomField->new(current_user => RT->system_user);
 $cf2->create(name => 'SearchTest2', type => 'Freeform', MaxValues => 0, queue => $q->id);
 ok($cf2->id, "Created the SearchTest2 CF");
-my $cflabel2 = "CustomField-".$cf2->id;
+my $cflabel2 = "custom_field-".$cf2->id;
 
 my $cf3 = RT::Model::CustomField->new(current_user => RT->system_user);
 $cf3->create(name => 'SearchTest3', type => 'Freeform', MaxValues => 0, queue => $q->id);
 ok($cf3->id, "Created the SearchTest3 CF");
-my $cflabel3 = "CustomField-".$cf3->id;
+my $cflabel3 = "custom_field-".$cf3->id;
 
 
 # There was a bug involving a missing join to ObjectCustomFields that
@@ -63,7 +63,7 @@
 my ( $id, undef $msg ) = $t1->create(
     queue      => $q->id,
     subject    => 'SearchTest1',
-    Requestor  => ['search1 at example.com'],
+    requestor  => ['search1 at example.com'],
     $cflabel   => 'foo1',
     $cflabel2  => 'bar1',
     $cflabel3  => 'qux1',
@@ -75,7 +75,7 @@
 ( $id, undef, $msg ) = $t2->create(
     queue      => $q->id,
     subject    => 'SearchTest2',
-    Requestor  => ['search2 at example.com'],
+    requestor  => ['search2 at example.com'],
 #    $cflabel   => 'foo2',
     $cflabel2  => 'bar2',
     $cflabel3  => 'qux2',
@@ -86,7 +86,7 @@
 ( $id, undef, $msg ) = $t3->create(
     queue      => $q->id,
     subject    => 'SearchTest3',
-    Requestor  => ['search3 at example.com'],
+    requestor  => ['search3 at example.com'],
     $cflabel   => 'foo3',
 #    $cflabel2  => 'bar3',
     $cflabel3  => 'qux3',
@@ -97,7 +97,7 @@
 ( $id, undef, $msg ) = $t4->create(
     queue      => $q->id,
     subject    => 'SearchTest4',
-    Requestor  => ['search4 at example.com'],
+    requestor  => ['search4 at example.com'],
     $cflabel   => 'foo4',
     $cflabel2  => 'bar4',
 #    $cflabel3  => 'qux4',
@@ -108,7 +108,7 @@
 ( $id, undef, $msg ) = $t5->create(
     queue      => $q->id,
 #    subject    => 'SearchTest5',
-    Requestor  => ['search5 at example.com'],
+    requestor  => ['search5 at example.com'],
     $cflabel   => 'foo5',
     $cflabel2  => 'bar5',
     $cflabel3  => 'qux5',
@@ -130,7 +130,7 @@
 ( $id, undef, $msg ) = $t7->create(
     queue      => $q->id,
     subject    => 'SearchTest7',
-    Requestor  => ['search7 at example.com'],
+    requestor  => ['search7 at example.com'],
 #    $cflabel   => 'foo7',
 #    $cflabel2  => 'bar7',
     $cflabel3  => 'qux7',
@@ -147,8 +147,7 @@
 
 $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
 $tix->from_sql("Queue = '$queue' AND CF.SearchTest = 'foo1'");
-is($tix->count, 1, "matched identical subject");
-
+is($tix->count, 1, "matched identical cf value");
 
 $tix = RT::Model::TicketCollection->new(current_user => RT->system_user);
 $tix->from_sql("Queue = '$queue' AND CF.SearchTest LIKE 'foo1'");

Modified: rt/branches/3.999-DANGEROUS/t/web/cf_access.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/cf_access.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/cf_access.t	Sun Feb  3 13:46:00 2008
@@ -53,7 +53,8 @@
     $m->field( $_ => undef ) for @names;    # ...and not any other. ;-)
     $m->submit;
 
-    $m->content_like( qr/Object Created/, 'TCF added to the queue' );
+    $m->content_like( qr/Created/, 'TCF added to the queue' );
+
 }
 
 my $tester = RT::Test->load_or_create_user( name => 'tester', password => '123456' );

Modified: rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/web/cf_select_one.t	Sun Feb  3 13:46:00 2008
@@ -27,8 +27,7 @@
             lookup_type    => 'RT::Model::Queue-RT::Model::Ticket',
         },
     );
-    $m->content_like( qr/Object Created/, 'Created CF sucessfully' );
-    die $m->content;
+    $m->content_like( qr/Created/, 'Created CF sucessfully' );
     $cfid = $m->form_name('ModifyCustomField')->value('id');
     ok $cfid, "found id of the CF in the form, it's #$cfid";
 }
@@ -43,7 +42,7 @@
             },
             button => 'Update',
         );
-        $m->content_like( qr/Object Created/, 'added a value to the CF' ); # or diag $m->content;
+        $m->content_like( qr/Created/, 'added a value to the CF' ); # or diag $m->content;
     }
 }
 
@@ -63,7 +62,7 @@
     $m->field( "object-". $queue->id ."-CF-$cfid" => 1 );
     $m->submit;
 
-    $m->content_like( qr/Object Created/, 'TCF added to the queue' );
+    $m->content_like( qr/Created/, 'TCF added to the queue' );
 }
 
 my $tid;
@@ -75,7 +74,7 @@
     ($tid, $txnid, $msg) = $ticket->create(
         subject => 'test',
         queue => $queue->id,
-        "CustomField-$cfid" => 'ASD',
+        "custom_field-$cfid" => 'ASD',
     );
     ok $tid, "Created ticket";
     diag $msg if $msg && $ENV{'TEST_VERBOSE'};


More information about the Rt-commit mailing list