[Rt-commit] r10543 - in rt/branches/3.999-DANGEROUS: html/REST/1.0/Forms/ticket html/Ticket/Elements lib/RT lib/RT/Interface lib/RT/Model t t/api
ruz at bestpractical.com
ruz at bestpractical.com
Mon Jan 28 22:40:50 EST 2008
Author: ruz
Date: Mon Jan 28 22:40:50 2008
New Revision: 10543
Modified:
rt/branches/3.999-DANGEROUS/etc/initialdata
rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/attachments
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus
rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.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/lib/RT/Model/Transaction.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm
rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm
rt/branches/3.999-DANGEROUS/t/api/attribute-tests.t
rt/branches/3.999-DANGEROUS/t/api/attribute.t
rt/branches/3.999-DANGEROUS/t/api/ticket.t
rt/branches/3.999-DANGEROUS/t/rtname.t
Log:
* more fixes and breakages in API
Modified: rt/branches/3.999-DANGEROUS/etc/initialdata
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/initialdata (original)
+++ rt/branches/3.999-DANGEROUS/etc/initialdata Mon Jan 28 22:40:50 2008
@@ -681,8 +681,8 @@
@Attributes = (
{ name => 'Search - My Tickets',
- Description => '%1 highest priority tickets I own', # loc
- Content =>
+ description => '%1 highest priority tickets I own', # loc
+ content =>
{ Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
. q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
. q{Priority, Queuename, ExtendedStatus},
@@ -692,8 +692,8 @@
},
},
{ name => 'Search - Unowned Tickets',
- Description => '%1 newest unowned tickets', # loc
- Content =>
+ description => '%1 newest unowned tickets', # loc
+ content =>
# 'Take' #loc
{ Format => q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a>/TITLE:#',}
. q{'<a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a>/TITLE:Subject',}
@@ -705,8 +705,8 @@
},
},
{ name => 'HomepageSettings',
- Description => 'HomepageSettings',
- Content =>
+ description => 'HomepageSettings',
+ content =>
{ 'body' => # loc
[ { type => 'system', name => 'My Tickets' },
{ type => 'system', name => 'Unowned Tickets' },
Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/attachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/attachments (original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/attachments Mon Jan 28 22:40:50 2008
@@ -86,7 +86,7 @@
# if we're sending a binary attachment (and only the attachment)
# flag it so bin/rt knows to special case it
if ($attachment->content_type !~ /^text\//) {
- $r->content_type($attachment->ContentType);
+ $r->content_type($attachment->content_type);
}
} else {
my @data;
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments Mon Jan 28 22:40:50 2008
@@ -79,9 +79,9 @@
$attachments->limit( alias => $transactions, column => 'type', operator => '!=', value => "comment" );
}
- $attachments->limit ( column => 'ContentType', operator => '=', value => 'text/plain');
- $attachments->limit ( column => 'ContentType', operator => 'starts_with', value => 'message/');
- $attachments->limit ( column => 'ContentType', operator => '=', value => 'text');
+ $attachments->limit ( column => 'content_type', operator => '=', value => 'text/plain');
+ $attachments->limit ( column => 'content_type', operator => 'starts_with', value => 'message/');
+ $attachments->limit ( column => 'content_type', operator => '=', value => 'text');
$attachments->limit ( column => 'Filename', operator => 'IS', value => 'NULL')
if RT->config->get('SuppressInlineTextFiles', $Ticket->current_user );
}
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowGnuPGStatus Mon Jan 28 22:40:50 2008
@@ -86,7 +86,7 @@
}
my $attachments = $txn->attachments->clone;
- $attachments->limit( column => 'ContentType', value => 'application/x-rt-original-message' );
+ $attachments->limit( column => 'content_type', value => 'application/x-rt-original-message' );
my $original = $attachments->first;
unless ( $original ) {
return (0, "Couldn't find attachment with original email of transaction #". $txn->id);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/EmailParser.pm Mon Jan 28 22:40:50 2008
@@ -362,7 +362,7 @@
}
}
-=head2 ParseAddressFromHeader ADDRESS
+=head2 parse_address_from_header ADDRESS
Takes an address from $self->head->get('Line') and returns a tuple: user at host, friendly name
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm Mon Jan 28 22:40:50 2008
@@ -78,7 +78,7 @@
&ParseCcAddressesFromHead
&ParseSenderAddressFromHead
&ParseErrorsToAddressFromHead
- &ParseAddressFromHeader
+ &parse_address_from_header
&Gateway);
}
@@ -629,12 +629,12 @@
value => $main_content->id,
);
$attachments->limit(
- column => 'ContentType',
+ column => 'content_type',
operator => 'NOT starts_with',
value => 'multipart/',
);
$attachments->limit(
- column => 'Content',
+ column => 'content',
operator => '!=',
value => '',
);
@@ -914,7 +914,7 @@
#Figure out who's sending this message.
foreach my $header ( 'Reply-To', 'From', 'Sender' ) {
my $addr_line = $head->get($header) || next;
- my ( $addr, $name ) = ParseAddressFromHeader($addr_line);
+ my ( $addr, $name ) = parse_address_from_header($addr_line);
# only return if the address is not empty
return ( $addr, $name ) if $addr;
@@ -941,7 +941,7 @@
# If there's a header of that name
my $headerobj = $head->get($header);
if ($headerobj) {
- my ( $addr, $name ) = ParseAddressFromHeader($headerobj);
+ my ( $addr, $name ) = parse_address_from_header($headerobj);
# If it's got actual useful content...
return ($addr) if ($addr);
@@ -949,7 +949,7 @@
}
}
-=head2 ParseAddressFromHeader ADDRESS
+=head2 parse_address_from_header ADDRESS
Takes an address from C<$head->get('Line')> and returns a tuple: user at host, friendly name
@@ -1280,7 +1280,7 @@
return ( 0, $result, undef );
}
- $args{'ticket'} ||= ParseTicketId($Subject);
+ $args{'ticket'} ||= parse_ticket_id($Subject);
$SystemTicket = RT::Model::Ticket->new( current_user => RT->system_user );
$SystemTicket->load( $args{'ticket'} ) if ( $args{'ticket'} );
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm Mon Jan 28 22:40:50 2008
@@ -39,7 +39,7 @@
type is 'varchar(200)', default is '';
column Parent => max_length is 11, type is 'int(11)', default is '0';
column
- ContentType => max_length is 200,
+ content_type => max_length is 200,
type is 'varchar(200)', default is '';
column
Filename => max_length is 255,
@@ -110,7 +110,7 @@
my ($id) = $self->SUPER::create(
TransactionId => $args{'TransactionId'},
Parent => $args{'Parent'},
- ContentType => $Attachment->mime_type,
+ content_type => $Attachment->mime_type,
Headers => $Attachment->head->as_string,
MessageId => $MessageId,
Subject => $Subject,
@@ -145,7 +145,7 @@
my $id = $self->SUPER::create(
TransactionId => $args{'TransactionId'},
- ContentType => $Attachment->mime_type,
+ content_type => $Attachment->mime_type,
ContentEncoding => $ContentEncoding,
Parent => $args{'Parent'},
Headers => $Attachment->head->as_string,
@@ -262,7 +262,7 @@
my $self = shift;
return $self->content
- unless RT::I18N::is_textual_content_type( $self->ContentType );
+ unless RT::I18N::is_textual_content_type( $self->content_type );
my $enc = $self->original_encoding;
my $content;
@@ -346,7 +346,7 @@
# TODO: Handle Multipart/Mixed (eventually fix the link in the
# ShowHistory web template?)
- if ( RT::I18N::is_textual_content_type( $self->ContentType ) ) {
+ if ( RT::I18N::is_textual_content_type( $self->content_type ) ) {
$body = $self->content;
# Do we need any preformatting (wrapping, that is) of the message?
@@ -631,7 +631,7 @@
return ( 0, _('No key suitable for encryption') );
}
- $self->__set( column => 'ContentType', value => $type );
+ $self->__set( column => 'content_type', value => $type );
$self->set_header( 'Content-Type' => $type );
my $content = $self->content;
@@ -646,7 +646,7 @@
}
my ( $status, $msg )
- = $self->__set( column => 'Content', value => $content );
+ = $self->__set( column => 'content', value => $content );
unless ($status) {
return ( $status,
_( "Couldn't replace content with encrypted data: %1", $msg ) );
@@ -673,7 +673,7 @@
} else {
return ( 1, _('Is not encrypted') );
}
- $self->__set( column => 'ContentType', value => $type );
+ $self->__set( column => 'content_type', value => $type );
$self->set_header( 'Content-Type' => $type );
my $content = $self->content;
@@ -683,7 +683,7 @@
}
my ( $status, $msg )
- = $self->__set( column => 'Content', value => $content );
+ = $self->__set( column => 'content', value => $content );
unless ($status) {
return ( $status,
_( "Couldn't replace content with decrypted data: %1", $msg ) );
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm Mon Jan 28 22:40:50 2008
@@ -129,7 +129,7 @@
@_
);
- return $self->limit( %args, column => 'ContentType' );
+ return $self->limit( %args, column => 'content_type' );
}
=head2 ChildrenOf ID
@@ -157,14 +157,14 @@
my $self = shift;
$self->limit(
entry_aggregator => 'AND',
- column => 'Content',
+ column => 'content',
operator => 'IS NOT',
value => 'NULL',
quote_value => 0,
);
$self->limit(
entry_aggregator => 'AND',
- column => 'Content',
+ column => 'content',
operator => '!=',
value => '',
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm Mon Jan 28 22:40:50 2008
@@ -65,12 +65,12 @@
object_type => max_length is 200,
type is 'varchar(200)', default is '';
column
- Description => max_length is 255,
+ description => max_length is 255,
type is 'varchar(255)', default is '';
column
- ContentType => max_length is 255,
+ content_type => max_length is 255,
type is 'varchar(255)', default is '';
- column Content => type is 'blob', default is '';
+ column content => type is 'blob', default is '';
};
@@ -78,7 +78,7 @@
RT::Model::Attribute
-=head1 Content
+=head1 content
=cut
@@ -149,8 +149,8 @@
Create takes a hash of values and creates a row in the database:
varchar(200) 'name'.
- varchar(255) 'Content'.
- varchar(16) 'ContentType',
+ varchar(255) 'content'.
+ varchar(16) 'content_type',
varchar(64) 'object_type'.
int(11) 'object_id'.
@@ -162,9 +162,9 @@
my $self = shift;
my %args = (
name => '',
- Description => '',
- Content => '',
- ContentType => '',
+ description => '',
+ content => '',
+ content_type => '',
Object => undef,
@_
);
@@ -203,21 +203,21 @@
return ( 0, _('Permission Denied') );
}
- if ( ref( $args{'Content'} ) ) {
+ if ( ref( $args{'content'} ) ) {
eval {
- $args{'Content'} = $self->_serialize_content( $args{'Content'} );
+ $args{'content'} = $self->_serialize_content( $args{'content'} );
};
if ($@) {
return ( 0, $@ );
}
- $args{'ContentType'} = 'storable';
+ $args{'content_type'} = 'storable';
}
$self->SUPER::create(
name => $args{'name'},
- Content => $args{'Content'},
- ContentType => $args{'ContentType'},
- Description => $args{'Description'},
+ content => $args{'content'},
+ content_type => $args{'content_type'},
+ description => $args{'description'},
object_type => $args{'object_type'},
object_id => $args{'object_id'},
);
@@ -254,7 +254,7 @@
=head2 _DeserializeContent
-DeserializeContent returns this Attribute's "Content" as a hashref.
+DeserializeContent returns this Attribute's "content" as a hashref.
=cut
@@ -274,7 +274,7 @@
}
-=head2 Content
+=head2 content
Returns this attribute's content. If it's a scalar, returns a scalar
If it's data structure returns a ref to that data structure.
@@ -285,8 +285,8 @@
my $self = shift;
# Here we call _value to get the ACL check.
- my $content = $self->_value('Content');
- if ( $self->__value('ContentType') eq 'storable' ) {
+ my $content = $self->_value('content');
+ if ( $self->__value('content_type') eq 'storable' ) {
eval { $content = $self->_deserialize_content($content); };
if ($@) {
Jifty->log->error( "Deserialization of content for attribute "
@@ -311,7 +311,7 @@
my $content = shift;
# Call __value to avoid ACL check.
- if ( $self->__value('ContentType') eq 'storable' ) {
+ if ( $self->__value('content_type') eq 'storable' ) {
# We eval the serialization because it will lose on a coderef.
$content = eval { $self->_serialize_content($content) };
@@ -320,7 +320,7 @@
return ( 0, "Content couldn't be frozen" );
}
}
- return $self->_set( column => 'Content', value => $content );
+ return $self->_set( column => 'content', value => $content );
}
=head2 SubValue KEY
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm Mon Jan 28 22:40:50 2008
@@ -138,13 +138,13 @@
return ($attr);
}
-=head2 delete_entry { name => Content => , id => }
+=head2 delete_entry { name => content => , id => }
Deletes attributes with
the matching name
and the matching content or id
-If Content and id are both undefined, delete all attributes with
+If content and id are both undefined, delete all attributes with
the matching name.
=cut
@@ -153,16 +153,16 @@
my $self = shift;
my %args = (
name => undef,
- Content => undef,
+ content => undef,
id => undef,
@_
);
my $found = 0;
foreach my $attr ( $self->named( $args{'name'} ) ) {
- if ( ( !defined $args{'id'} and !defined $args{'Content'} )
+ if ( ( !defined $args{'id'} and !defined $args{'content'} )
or ( defined $args{'id'} and $attr->id eq $args{'id'} )
- or ( defined $args{'Content'}
- and $attr->content eq $args{'Content'} )
+ or ( defined $args{'content'}
+ and $attr->content eq $args{'content'} )
)
{
my ( $id, $msg ) = $attr->delete;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm Mon Jan 28 22:40:50 2008
@@ -262,13 +262,13 @@
sub load_ticket_role_group {
my $self = shift;
my %args = (
- Ticket => '0',
+ ticket => '0',
type => undef,
@_
);
$self->load_by_cols(
domain => 'RT::Model::Ticket-Role',
- instance => $args{'Ticket'},
+ instance => $args{'ticket'},
type => $args{'type'}
);
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm Mon Jan 28 22:40:50 2008
@@ -779,7 +779,7 @@
= RT::Model::User->new( current_user => RT->system_user );
my ( $Address, $name )
- = RT::Interface::Email::ParseAddressFromHeader(
+ = RT::Interface::Email::parse_address_from_header(
$args{'Email'} );
my ( $Val, $Message ) = $new_user->create(
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 Mon Jan 28 22:40:50 2008
@@ -1104,7 +1104,7 @@
my $self = shift;
my $owner_obj = RT::Model::Group->new;
$owner_obj->load_ticket_role_group(
- Ticket => $self->id,
+ ticket => $self->id,
type => 'Owner'
);
return ($owner_obj);
@@ -1219,7 +1219,7 @@
my $group = RT::Model::Group->new;
$group->load_ticket_role_group(
type => $args{'type'},
- Ticket => $self->id
+ ticket => $self->id
);
unless ( $group->id ) {
return ( 0, _("Group not found") );
@@ -1317,7 +1317,7 @@
my $group = RT::Model::Group->new;
$group->load_ticket_role_group(
type => $args{'type'},
- Ticket => $self->id
+ ticket => $self->id
);
unless ( $group->id ) {
return ( 0, _("Group not found") );
@@ -1530,7 +1530,7 @@
if ( $self->current_user_has_right('ShowTicket') ) {
$group->load_ticket_role_group(
type => 'Requestor',
- Ticket => $self->id
+ ticket => $self->id
);
}
return ($group);
@@ -1578,7 +1578,7 @@
if ( $self->current_user_has_right('ShowTicket') ) {
$group->load_ticket_role_group(
type => 'AdminCc',
- Ticket => $self->id
+ ticket => $self->id
);
}
return ($group);
@@ -1623,7 +1623,7 @@
my $group = RT::Model::Group->new;
$group->load_ticket_role_group(
type => $args{'type'},
- Ticket => $self->id
+ ticket => $self->id
);
# Find the relevant principal.
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 Mon Jan 28 22:40:50 2008
@@ -1440,7 +1440,7 @@
);
push @res, { %$row, alias => $CFvs, column => 'SortOrder' };
- push @res, { %$row, alias => $TicketCFs, column => 'Content' };
+ push @res, { %$row, alias => $TicketCFs, column => 'content' };
} elsif ( $field eq "Custom" && $subkey eq "Ownership" ) {
# PAW logic is "reversed"
@@ -1903,7 +1903,7 @@
my $self = shift;
my %args = (@_);
$self->limit(
- column => 'Content',
+ column => 'content',
value => $args{'value'},
operator => $args{'operator'},
description => join( ' ',
@@ -1951,7 +1951,7 @@
my $self = shift;
my %args = (@_);
$self->limit(
- column => 'ContentType',
+ column => 'content_type',
value => $args{'value'},
operator => $args{'operator'},
description => join( ' ',
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm Mon Jan 28 22:40:50 2008
@@ -569,7 +569,7 @@
return undef unless my $Attachment = $self->attachments->first;
# If it's a textual part, just return the body.
- if ( RT::I18N::is_textual_content_type( $Attachment->ContentType ) ) {
+ if ( RT::I18N::is_textual_content_type( $Attachment->content_type ) ) {
return ($Attachment);
}
@@ -591,7 +591,7 @@
my $all_parts = $self->attachments;
while ( my $part = $all_parts->next ) {
next
- unless RT::I18N::is_textual_content_type( $part->ContentType )
+ unless RT::I18N::is_textual_content_type( $part->content_type )
&& $part->content;
return $part;
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm Mon Jan 28 22:40:50 2008
@@ -558,7 +558,7 @@
( $email, $name ) = ( $email->address, $email->phrase );
} else {
( $email, $name )
- = RT::Interface::Email::ParseAddressFromHeader($email);
+ = RT::Interface::Email::parse_address_from_header($email);
}
$self->load_by_email($email);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm Mon Jan 28 22:40:50 2008
@@ -156,7 +156,7 @@
$self->limit(
$clause => $alias,
- column => 'Content',
+ column => 'content',
operator => $operator,
value => $args{value},
);
@@ -164,7 +164,7 @@
# Capture rows with the attribute defined as an empty string.
$self->limit(
$clause => $alias,
- column => 'Content',
+ column => 'content',
operator => '=',
value => '',
entry_aggregator => $args{NULL} ? 'AND' : 'OR',
@@ -233,7 +233,7 @@
);
$self->limit(
alias => $alias,
- column => 'Content',
+ column => 'content',
operator => $args{'operator'},
value => $args{'value'},
);
Modified: rt/branches/3.999-DANGEROUS/t/api/attribute-tests.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/attribute-tests.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/attribute-tests.t Mon Jan 28 22:40:50 2008
@@ -26,7 +26,7 @@
ok (UNIVERSAL::isa($attr,'RT::Model::AttributeCollection'), 'got the attributes object');
-($id, $msg) = $user->add_attribute(name => 'TestAttr', Content => 'The attribute has content');
+($id, $msg) = $user->add_attribute(name => 'TestAttr', content => 'The attribute has content');
ok ($id, $msg);
is ($attr->count,1, " One attr after adding a first one");
@@ -43,7 +43,7 @@
is ("@names", "TestAttr");
-($id, $msg) = $user->add_attribute(name => $runid, Content => "First");
+($id, $msg) = $user->add_attribute(name => $runid, content => "First");
ok($id, $msg);
my $runid_attr = $user->first_attribute($runid);
@@ -52,7 +52,7 @@
is($runid_attr->content, 'First', "got the right content back");
is ($attr->count,2, " Two attrs after adding an attribute named $runid");
-($id, $msg) = $user->add_attribute(name => $runid, Content => "Second");
+($id, $msg) = $user->add_attribute(name => $runid, content => "Second");
ok($id, $msg);
$runid_attr = $user->first_attribute($runid);
@@ -61,12 +61,12 @@
is($runid_attr->content, 'First', "got the first content back still");
is ($attr->count,3, " Three attrs after adding a secondvalue to $runid");
-($id, $msg) = $attr->delete_entry(name => $runid, Content => "First");
+($id, $msg) = $attr->delete_entry(name => $runid, content => "First");
ok($id, $msg);
is ($attr->count,2);
#$attr->_do_search();
-($id, $msg) = $attr->delete_entry(name => $runid, Content => "Second");
+($id, $msg) = $attr->delete_entry(name => $runid, content => "Second");
ok($id, $msg);
is ($attr->count,1);
Modified: rt/branches/3.999-DANGEROUS/t/api/attribute.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/attribute.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/attribute.t Mon Jan 28 22:40:50 2008
@@ -7,7 +7,7 @@
my $user = RT->system_user;
-my ($id, $msg) = $user->user_object->add_attribute(name => 'SavedSearch', Content => { Query => 'Foo'} );
+my ($id, $msg) = $user->user_object->add_attribute(name => 'SavedSearch', content => { Query => 'Foo'} );
ok ($id, $msg);
my $attr = RT::Model::Attribute->new(current_user => RT->system_user);
$attr->load($id);
Modified: rt/branches/3.999-DANGEROUS/t/api/ticket.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/ticket.t (original)
+++ rt/branches/3.999-DANGEROUS/t/api/ticket.t Mon Jan 28 22:40:50 2008
@@ -109,7 +109,7 @@
);
ok ($id, "Ticket $id was Created");
ok(my $group = RT::Model::Group->new(current_user => RT->system_user));
-ok($group->load_ticket_role_group(Ticket => $id, Type=> 'Requestor'));
+ok($group->load_ticket_role_group(ticket => $id, type=> 'Requestor'));
ok ($group->id, "Found the requestors object for this ticket");
ok(my $jesse = RT::Model::User->new(current_user => RT->system_user), "Creating a jesse rt::user");
@@ -129,13 +129,13 @@
$group = RT::Model::Group->new(current_user => RT->system_user);
-ok($group->load_ticket_role_group(Ticket => $id, Type=> 'Cc'));
+ok($group->load_ticket_role_group(ticket => $id, type => 'Cc'));
ok ($group->id, "Found the cc object for this ticket");
$group = RT::Model::Group->new(current_user => RT->system_user);
-ok($group->load_ticket_role_group(Ticket => $id, Type=> 'AdminCc'));
+ok($group->load_ticket_role_group(ticket => $id, type=> 'AdminCc'));
ok ($group->id, "Found the AdminCc object for this ticket");
$group = RT::Model::Group->new(current_user => RT->system_user);
-ok($group->load_ticket_role_group(Ticket => $id, Type=> 'Owner'));
+ok($group->load_ticket_role_group(ticket => $id, type=> 'Owner'));
ok ($group->id, "Found the Owner object for this ticket");
ok($group->has_member(RT->nobody->user_object->principal_object), "the owner group has the member 'RT_System'");
Modified: rt/branches/3.999-DANGEROUS/t/rtname.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/rtname.t (original)
+++ rt/branches/3.999-DANGEROUS/t/rtname.t Mon Jan 28 22:40:50 2008
@@ -10,25 +10,25 @@
RT->config->set( rtname => "site" );
RT->config->set( EmailSubjectTagRegex => qr/site/ );
RT->config->set( rtname => undef );
-is(RT::Interface::Email::ParseTicketId("[site #123] test"), 123);
-is(RT::Interface::Email::ParseTicketId("[othersite #123] test"), undef);
+is(RT::Interface::Email::parse_ticket_id("[site #123] test"), 123);
+is(RT::Interface::Email::parse_ticket_id("[othersite #123] test"), undef);
# oops usecase, where the regexp is scragged
RT->config->set( rtname => "site" );
RT->config->set( EmailSubjectTagRegex => undef );
-is(RT::Interface::Email::ParseTicketId("[site #123] test"), 123);
-is(RT::Interface::Email::ParseTicketId("[othersite #123] test"), undef);
+is(RT::Interface::Email::parse_ticket_id("[site #123] test"), 123);
+is(RT::Interface::Email::parse_ticket_id("[othersite #123] test"), undef);
# set to a simple regexp. NOTE: we no longer match "site"
RT->config->set( rtname => "site");
RT->config->set( EmailSubjectTagRegex => qr/newsite/);
-is(RT::Interface::Email::ParseTicketId("[site #123] test"), undef);
-is(RT::Interface::Email::ParseTicketId("[newsite #123] test"), 123);
+is(RT::Interface::Email::parse_ticket_id("[site #123] test"), undef);
+is(RT::Interface::Email::parse_ticket_id("[newsite #123] test"), 123);
# set to a more complex regexp
RT->config->set( rtname => "site" );
RT->config->set( EmailSubjectTagRegex => qr/newsite|site/ );
-is(RT::Interface::Email::ParseTicketId("[site #123] test"), 123);
-is(RT::Interface::Email::ParseTicketId("[newsite #123] test"), 123);
-is(RT::Interface::Email::ParseTicketId("[othersite #123] test"), undef);
+is(RT::Interface::Email::parse_ticket_id("[site #123] test"), 123);
+is(RT::Interface::Email::parse_ticket_id("[newsite #123] test"), 123);
+is(RT::Interface::Email::parse_ticket_id("[othersite #123] test"), undef);
More information about the Rt-commit
mailing list