[Rt-commit] r10566 - rt/branches/3.999-DANGEROUS/lib/RT/Model
ruz at bestpractical.com
ruz at bestpractical.com
Tue Jan 29 18:20:56 EST 2008
Author: ruz
Date: Tue Jan 29 18:20:55 2008
New Revision: 10566
Modified:
rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.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/CachedGroupMemberCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomFieldCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/Group.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMemberCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/LinkCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomField.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/TemplateCollection.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/TransactionCollection.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm
Log:
* convert column => "CamelCase"
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm Tue Jan 29 18:20:55 2008
@@ -512,7 +512,7 @@
my $delegated_from_this
= RT::Model::ACECollection->new( current_user => RT->system_user );
$delegated_from_this->limit(
- column => 'DelegatedFrom',
+ column => 'delegated_from',
operator => '=',
value => $self->id
);
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 Tue Jan 29 18:20:55 2008
@@ -530,7 +530,7 @@
$value =~ s/\r+\n/\n /g;
$newheader .= "$tag: $value\n";
}
- return $self->__set( column => 'Headers', value => $newheader );
+ return $self->__set( column => 'headers', value => $newheader );
}
=head2 SetHeader ( 'Tag', 'Value' )
@@ -554,7 +554,7 @@
}
$newheader .= "$tag: $_[0]\n" if defined $tag;
- $self->__set( column => 'Headers', value => $newheader );
+ $self->__set( column => 'headers', value => $newheader );
}
=head2 split_headers
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 Tue Jan 29 18:20:55 2008
@@ -142,7 +142,7 @@
my $self = shift;
my $attachment = shift;
return $self->limit(
- column => 'Parent',
+ column => 'parent',
value => $attachment
);
}
@@ -200,7 +200,7 @@
$self->limit(
entry_aggregator => 'AND',
alias => $tickets,
- column => 'EffectiveId',
+ column => 'effective_id',
value => $tid,
);
return;
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMemberCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMemberCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CachedGroupMemberCollection.pm Tue Jan 29 18:20:55 2008
@@ -85,7 +85,7 @@
my $principals = $self->new_alias('Principals');
$self->join(
alias1 => 'main',
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $principals,
column2 => 'id'
);
@@ -116,7 +116,7 @@
my $principals = $self->new_alias('Principals');
$self->join(
alias1 => 'main',
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $principals,
column2 => 'id'
);
@@ -148,7 +148,7 @@
return (
$self->limit(
value => $group,
- column => 'GroupId',
+ column => 'group_id',
entry_aggregator => 'OR',
)
);
@@ -174,7 +174,7 @@
return (
$self->limit(
value => $member || '0',
- column => 'MemberId',
+ column => 'member_id',
entry_aggregator => 'OR',
quote_value => 0
)
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomFieldCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomFieldCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomFieldCollection.pm Tue Jan 29 18:20:55 2008
@@ -211,23 +211,23 @@
my $self = shift;
my $lookup = shift;
- $self->limit( column => 'LookupType', value => "$lookup" );
+ $self->limit( column => 'lookup_type', value => "$lookup" );
}
sub limit_to_child_type {
my $self = shift;
my $lookup = shift;
- $self->limit( column => 'LookupType', value => "$lookup" );
- $self->limit( column => 'LookupType', ENDSWITH => "$lookup" );
+ $self->limit( column => 'lookup_type', value => "$lookup" );
+ $self->limit( column => 'lookup_type', ENDSWITH => "$lookup" );
}
sub limit_to_parent_type {
my $self = shift;
my $lookup = shift;
- $self->limit( column => 'LookupType', value => "$lookup" );
- $self->limit( column => 'LookupType', starts_with => "$lookup" );
+ $self->limit( column => 'lookup_type', value => "$lookup" );
+ $self->limit( column => 'lookup_type', starts_with => "$lookup" );
}
sub limit_to_global_orobject_id {
@@ -259,7 +259,7 @@
);
# This doesn't work on postgres.
-#$self->order_by( alias => $class_cfs , column => "SortOrder", order => 'ASC');
+#$self->order_by( alias => $class_cfs , column => "sort_order", order => 'ASC');
}
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 Tue Jan 29 18:20:55 2008
@@ -677,7 +677,7 @@
my $cached_submembers = RT::Model::CachedGroupMemberCollection->new;
$cached_submembers->limit(
- column => 'ImmediateParentId',
+ column => 'immediate_parent_id',
operator => '=',
value => $self->id
);
@@ -778,13 +778,13 @@
my $members_alias = $groups->new_alias($members_table);
$groups->join(
alias1 => $members_alias,
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $groups->principals_alias,
column2 => 'id',
);
$groups->limit(
alias => $members_alias,
- column => 'GroupId',
+ column => 'group_id',
value => $self->id,
);
$groups->limit(
@@ -822,13 +822,13 @@
my $members_alias = $users->new_alias($members_table);
$users->join(
alias1 => $members_alias,
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $users->principals_alias,
column2 => 'id',
);
$users->limit(
alias => $members_alias,
- column => 'GroupId',
+ column => 'group_id',
value => $self->id,
);
$users->limit(
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupCollection.pm Tue Jan 29 18:20:55 2008
@@ -285,12 +285,12 @@
alias1 => 'main',
column1 => 'id',
alias2 => $members,
- column2 => 'GroupId'
+ column2 => 'group_id'
);
$self->limit(
alias => $members,
- column => 'MemberId',
+ column => 'member_id',
operator => '=',
value => $args{'principal_id'}
);
@@ -310,18 +310,18 @@
type => 'LEFT',
column1 => 'id',
table2 => $members,
- column2 => 'GroupId',
+ column2 => 'group_id',
);
$self->limit(
left_join => $members_alias,
alias => $members_alias,
- column => 'MemberId',
+ column => 'member_id',
operator => '=',
value => $args{'principal_id'},
);
$self->limit(
alias => $members_alias,
- column => 'MemberId',
+ column => 'member_id',
operator => 'IS',
value => 'NULL',
quote_value => 0,
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMember.pm Tue Jan 29 18:20:55 2008
@@ -260,7 +260,7 @@
);
$cached_submembers->limit(
- column => 'ImmediateParentId',
+ column => 'immediate_parent_id',
operator => '=',
value => $self->group_obj->id
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMemberCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMemberCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/GroupMemberCollection.pm Tue Jan 29 18:20:55 2008
@@ -85,7 +85,7 @@
my $principals = $self->new_alias('Principals');
$self->join(
alias1 => 'main',
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $principals,
column2 => 'id'
);
@@ -116,7 +116,7 @@
my $principals = $self->new_alias('Principals');
$self->join(
alias1 => 'main',
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $principals,
column2 => 'id'
);
@@ -148,7 +148,7 @@
return (
$self->limit(
value => $group,
- column => 'GroupId',
+ column => 'group_id',
entry_aggregator => 'OR',
quote_value => 0
)
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/LinkCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/LinkCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/LinkCollection.pm Tue Jan 29 18:20:55 2008
@@ -101,7 +101,7 @@
{
$self->order_by(
alias => 'main',
- column => 'Base',
+ column => 'base',
order => 'ASC'
);
} elsif ( ( $args{'column'} eq 'Base' )
@@ -109,7 +109,7 @@
{
$self->order_by(
alias => 'main',
- column => 'Target',
+ column => 'target',
order => 'ASC'
);
}
@@ -132,7 +132,7 @@
my $URI = shift;
$self->limit( column => 'type', value => 'RefersTo' );
- $self->limit( column => 'Target', value => $URI );
+ $self->limit( column => 'target', value => $URI );
}
# }}}
@@ -149,7 +149,7 @@
my $URI = shift;
$self->limit( column => 'type', value => 'RefersTo' );
- $self->limit( column => 'Base', value => $URI );
+ $self->limit( column => 'base', value => $URI );
}
# }}}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomField.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomField.pm Tue Jan 29 18:20:55 2008
@@ -101,7 +101,7 @@
current_user => RT->system_user );
$ObjectCFs->limit_to_object_id( $args{'object_id'} );
$ObjectCFs->limit_to_lookup_type( $cf->lookup_type );
- $ObjectCFs->order_by( column => 'SortOrder', order => 'DESC' );
+ $ObjectCFs->order_by( column => 'sort_order', order => 'DESC' );
if ( my $first = $ObjectCFs->first ) {
$args{'SortOrder'} = $first->sort_order + 1;
} else {
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldCollection.pm Tue Jan 29 18:20:55 2008
@@ -76,7 +76,7 @@
);
$self->limit(
alias => $self->{'_cfs_alias'},
- column => 'LookupType',
+ column => 'lookup_type',
operator => '=',
value => $lookup,
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm Tue Jan 29 18:20:55 2008
@@ -85,7 +85,7 @@
$self->limit(
entry_aggregator => 'OR',
- column => 'Queue',
+ column => 'queue',
value => "$queue"
) if defined $queue;
@@ -108,7 +108,7 @@
$self->limit(
entry_aggregator => 'OR',
- column => 'Queue',
+ column => 'queue',
value => 0
);
@@ -332,13 +332,13 @@
# or to "global"
- $self->limit( column => "Stage", value => $args{'Stage'} );
+ $self->limit( column => "stage", value => $args{'Stage'} );
my $ConditionsAlias = $self->new_alias('ScripConditions');
$self->join(
alias1 => 'main',
- column1 => 'ScripCondition',
+ column1 => 'scrip_condition',
alias2 => $ConditionsAlias,
column2 => 'id'
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TemplateCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TemplateCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TemplateCollection.pm Tue Jan 29 18:20:55 2008
@@ -99,7 +99,7 @@
my $self = shift;
my $queue_id = shift;
$self->limit(
- column => 'Queue',
+ column => 'queue',
value => "$queue_id",
operator => '!='
);
@@ -120,7 +120,7 @@
my $self = shift;
my $queue_id = shift;
$self->limit(
- column => 'Queue',
+ column => 'queue',
value => "0",
operator => '='
);
@@ -141,7 +141,7 @@
my $self = shift;
my $queue_id = shift;
$self->limit(
- column => 'Queue',
+ column => 'queue',
value => "$queue_id",
operator => '='
);
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 Tue Jan 29 18:20:55 2008
@@ -581,7 +581,7 @@
#Set the ticket's effective ID now that we've Created it.
my ( $val, $msg ) = $self->__set(
- column => 'EffectiveId',
+ column => 'effective_id',
value => ( $args{'EffectiveId'} || $id )
);
unless ($val) {
@@ -733,7 +733,7 @@
} else {
$Owner = $DeferOwner;
- $self->__set( column => 'Owner', value => $Owner->id );
+ $self->__set( column => 'owner', value => $Owner->id );
}
$self->owner_group->_add_member(
@@ -1010,7 +1010,7 @@
$self->load( $args{'id'} );
} else {
my ( $val, $msg )
- = $self->__set( column => 'EffectiveId', value => $id );
+ = $self->__set( column => 'effective_id', value => $id );
unless ($val) {
Jifty->log->err(
@@ -1862,7 +1862,7 @@
unless $status;
}
- return ( $self->_set( column => 'Queue', value => $Newqueue_obj->id() ) );
+ return ( $self->_set( column => 'queue', value => $Newqueue_obj->id() ) );
}
# }}}
@@ -1988,7 +1988,7 @@
$TicketAsSystem->open();
}
- return ( $self->_set( column => 'Started', value => $time_obj->iso ) );
+ return ( $self->_set( column => 'started', value => $time_obj->iso ) );
}
@@ -2332,7 +2332,7 @@
entry_aggregator => 'OR'
);
$Tickets->limit(
- column => 'EffectiveId',
+ column => 'effective_id',
value => $self->effective_id
);
while ( my $Ticket = $Tickets->next ) {
@@ -2641,7 +2641,7 @@
#update this ticket's effective id to the new ticket's id.
my ( $id_val, $id_msg ) = $self->__set(
- column => 'EffectiveId',
+ column => 'effective_id',
value => $MergeInto->id()
);
@@ -2669,7 +2669,7 @@
# update all the links that point to that old ticket
my $old_links_to = RT::Model::LinkCollection->new(
current_user => $self->current_user );
- $old_links_to->limit( column => 'Target', value => $self->uri );
+ $old_links_to->limit( column => 'target', value => $self->uri );
my %old_seen;
while ( my $link = $old_links_to->next ) {
@@ -2699,7 +2699,7 @@
my $old_links_from = RT::Model::LinkCollection->new(
current_user => $self->current_user );
- $old_links_from->limit( column => 'Base', value => $self->uri );
+ $old_links_from->limit( column => 'base', value => $self->uri );
while ( my $link = $old_links_from->next ) {
if ( exists $old_seen{ $link->type. "-" . $link->target } ) {
@@ -2764,7 +2764,7 @@
#find all of the tickets that were merged into this ticket.
my $old_mergees = RT::Model::TicketCollection->new();
$old_mergees->limit(
- column => 'EffectiveId',
+ column => 'effective_id',
operator => '=',
value => $self->id
);
@@ -2772,7 +2772,7 @@
# update their EffectiveId fields to the new ticket's id
while ( my $ticket = $old_mergees->next() ) {
my ( $val, $msg ) = $ticket->__set(
- column => 'EffectiveId',
+ column => 'effective_id',
value => $MergeInto->id()
);
}
@@ -2947,7 +2947,7 @@
# as to not have an SQL transaction span two RT transactions
my ($return) = $self->_set(
- column => 'Owner',
+ column => 'owner',
value => $NewOwnerObj->id,
record_transaction => 0,
time_taken => 0,
@@ -3117,7 +3117,7 @@
#Set the Started time to "now"
$self->_set(
- column => 'Started',
+ column => 'started',
value => $now->iso,
record_transaction => 0
);
@@ -3127,7 +3127,7 @@
# It's misnamed, but that's just historical.
if ( $self->queue_obj->is_inactive_status( $args{status} ) ) {
$self->_set(
- column => 'Resolved',
+ column => 'resolved',
value => $now->iso,
record_transaction => 0
);
@@ -3258,7 +3258,7 @@
return (
$self->_set(
- column => 'Told',
+ column => 'told',
value => $datetold->iso,
time_taken => $timetaken,
TransactionType => 'Told'
@@ -3281,7 +3281,7 @@
#use __set to get no ACLs ;)
return (
$self->__set(
- column => 'Told',
+ column => 'told',
value => $now->iso
)
);
@@ -3302,9 +3302,9 @@
my $txns = $self->transactions;
$txns->limit( column => 'type', value => 'comment' );
$txns->limit( column => 'type', value => 'Correspond' );
- $txns->limit( column => 'Creator', operator => '!=', value => $uid );
+ $txns->limit( column => 'creator', operator => '!=', value => $uid );
$txns->limit(
- column => 'Created',
+ column => 'created',
operator => '>',
value => $attr->content
) if $attr;
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 Tue Jan 29 18:20:55 2008
@@ -456,7 +456,7 @@
$sb->open_paren;
$sb->_sql_limit(
alias => $linkalias,
- column => 'LocalBase',
+ column => 'local_base',
value => 'main.id',
quote_value => 0,
entry_aggregator => 'AND',
@@ -472,7 +472,7 @@
$sb->open_paren;
$sb->_sql_limit(
alias => $linkalias,
- column => 'LocalTarget',
+ column => 'local_target',
value => 'main.id',
quote_value => 0,
entry_aggregator => 'OR',
@@ -626,7 +626,7 @@
$sb->_sql_limit(
alias => $sb->{_sql_transalias},
- column => 'Created',
+ column => 'created',
operator => ">=",
value => $daystart,
case_sensitive => 0,
@@ -634,7 +634,7 @@
);
$sb->_sql_limit(
alias => $sb->{_sql_transalias},
- column => 'Created',
+ column => 'created',
operator => "<=",
value => $dayend,
case_sensitive => 0,
@@ -650,7 +650,7 @@
#Search for the right field
$sb->_sql_limit(
alias => $sb->{_sql_transalias},
- column => 'Created',
+ column => 'created',
operator => $op,
value => $date->iso,
case_sensitive => 0,
@@ -738,7 +738,7 @@
{
$self->_sql_limit(
alias => $self->{_sql_trattachalias},
- column => 'Filename',
+ column => 'filename',
operator => 'IS',
value => 'NULL',
subclause => 'contentquery',
@@ -798,7 +798,7 @@
my $o = RT::Model::User->new;
$o->load($value);
$self->_sql_limit(
- column => 'Owner',
+ column => 'owner',
operator => $op,
value => $o->id,
%rest,
@@ -818,14 +818,14 @@
# and make sure we don't match records where group is member of itself
$self->SUPER::limit(
leftjoin => $group_members,
- column => 'GroupId',
+ column => 'group_id',
operator => '!=',
value => "$group_members.MemberId",
quote_value => 0,
);
$self->_sql_limit(
alias => $group_members,
- column => 'GroupId',
+ column => 'group_id',
operator => $op,
value => $value,
%rest,
@@ -857,7 +857,7 @@
$self->SUPER::limit(
leftjoin => $group_members,
alias => $group_members,
- column => 'MemberId',
+ column => 'member_id',
value => $uid,
);
$self->_sql_limit(
@@ -870,7 +870,7 @@
} else {
$self->SUPER::limit(
leftjoin => $group_members,
- column => 'GroupId',
+ column => 'group_id',
operator => '!=',
value => "$group_members.MemberId",
quote_value => 0,
@@ -878,7 +878,7 @@
my $users = $self->join(
type => 'left',
alias1 => $group_members,
- column1 => 'MemberId',
+ column1 => 'member_id',
table2 => 'Users',
column2 => 'id',
);
@@ -911,7 +911,7 @@
$self->SUPER::limit(
leftjoin => $group_members,
alias => $group_members,
- column => 'MemberId',
+ column => 'member_id',
value => "$users.id",
quote_value => 0,
);
@@ -994,7 +994,7 @@
alias1 => $args{'GroupsAlias'},
column1 => 'id',
table2 => 'CachedGroupMembers',
- column2 => 'GroupId',
+ column2 => 'group_id',
entry_aggregator => 'AND',
);
@@ -1027,7 +1027,7 @@
# with MemberId == GroupId from results
$self->SUPER::limit(
leftjoin => $group_members,
- column => 'GroupId',
+ column => 'group_id',
operator => '!=',
value => "$group_members.MemberId",
quote_value => 0,
@@ -1035,7 +1035,7 @@
my $users = $self->join(
type => 'left',
alias1 => $group_members,
- column1 => 'MemberId',
+ column1 => 'member_id',
table2 => 'Users',
column2 => 'id',
);
@@ -1099,7 +1099,7 @@
( $field, $op, $value, @rest ) = @$chunk;
$self->_sql_limit(
alias => $memberships,
- column => 'GroupId',
+ column => 'group_id',
value => $value,
operator => $op,
@rest,
@@ -1109,7 +1109,7 @@
} else {
$self->_sql_limit(
alias => $memberships,
- column => 'GroupId',
+ column => 'group_id',
value => $value,
operator => $op,
@rest,
@@ -1150,19 +1150,19 @@
alias1 => $groups,
column1 => 'id',
alias2 => $groupmembers,
- column2 => 'GroupId'
+ column2 => 'group_id'
);
$self->join(
alias1 => $groupmembers,
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $users,
column2 => 'id'
);
$self->join(
alias1 => $memberships,
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $users,
column2 => 'id'
);
@@ -1248,7 +1248,7 @@
} else {
my $ocfalias = $self->join(
type => 'left',
- column1 => 'Queue',
+ column1 => 'queue',
table2 => 'ObjectCustomFields',
column2 => 'object_id',
entry_aggregator => 'OR',
@@ -1462,7 +1462,7 @@
push @res,
{ %$row, column => "Owner=$nobodyId", order => $order };
- push @res, { %$row, column => "Priority", order => $order };
+ push @res, { %$row, column => "priority", order => $order };
} else {
push @res, $row;
}
@@ -1607,7 +1607,7 @@
#TODO check for a valid queue here
$self->limit(
- column => 'Queue',
+ column => 'queue',
value => $args{'value'},
operator => $args{'operator'},
description =>
@@ -1640,7 +1640,7 @@
@_
);
$self->limit(
- column => 'Status',
+ column => 'status',
value => $args{'value'},
operator => $args{'operator'},
description =>
@@ -1778,7 +1778,7 @@
my $self = shift;
my %args = (@_);
$self->limit(
- column => 'Priority',
+ column => 'priority',
value => $args{'value'},
operator => $args{'operator'},
description =>
@@ -1927,7 +1927,7 @@
my $self = shift;
my %args = (@_);
$self->limit(
- column => 'Filename',
+ column => 'filename',
value => $args{'value'},
operator => $args{'operator'},
description => join( ' ',
@@ -1988,7 +1988,7 @@
# FIXME: check for a valid $owner
$self->limit(
- column => 'Owner',
+ column => 'owner',
value => $args{'value'},
operator => $args{'operator'},
description =>
@@ -2071,7 +2071,7 @@
);
$self->limit(
- column => 'LinkedTo',
+ column => 'linked_to',
base => undef,
target => $args{'target'},
type => $args{'type'},
@@ -2113,7 +2113,7 @@
$type = $fromToMap{$type} if exists( $fromToMap{$type} );
$self->limit(
- column => 'LinkedTo',
+ column => 'linked_to',
target => undef,
base => $args{'base'},
type => $type,
@@ -2217,7 +2217,7 @@
# {{{ sub limit_Date
-=head2 limit_Date (column => 'DateField', operator => $oper, value => $ISODate)
+=head2 limit_Date (column => 'date_field', operator => $oper, value => $ISODate)
Takes a paramhash with the fields column operator and value.
@@ -2256,12 +2256,12 @@
sub limit_created {
my $self = shift;
- $self->limit_date( column => 'Created', @_ );
+ $self->limit_date( column => 'created', @_ );
}
sub limit_due {
my $self = shift;
- $self->limit_date( column => 'Due', @_ );
+ $self->limit_date( column => 'due', @_ );
}
@@ -2273,22 +2273,22 @@
sub limit_started {
my $self = shift;
- $self->limit_date( column => 'Started', @_ );
+ $self->limit_date( column => 'started', @_ );
}
sub limit_resolved {
my $self = shift;
- $self->limit_date( column => 'Resolved', @_ );
+ $self->limit_date( column => 'resolved', @_ );
}
sub limit_told {
my $self = shift;
- $self->limit_date( column => 'Told', @_ );
+ $self->limit_date( column => 'told', @_ );
}
sub limit_last_updated {
my $self = shift;
- $self->limit_date( column => 'LastUpdated', @_ );
+ $self->limit_date( column => 'last_updated', @_ );
}
#
@@ -2307,7 +2307,7 @@
sub limit_transaction_date {
my $self = shift;
my %args = (
- column => 'TransactionDate',
+ column => 'transaction_date',
value => undef,
operator => undef,
@@ -2359,7 +2359,7 @@
customfield => undef,
operator => '=',
description => undef,
- column => 'CustomFieldValue',
+ column => 'custom_field_value',
quote_value => 1,
@_
);
@@ -3118,7 +3118,7 @@
#TODO, we shouldn't be hard #coding the tablename to main.
$self->SUPER::limit(
- column => 'EffectiveId',
+ column => 'effective_id',
value => 'main.id',
entry_aggregator => 'AND',
quote_value => 0,
@@ -3128,7 +3128,7 @@
# FIXME: Need to bring this logic back in
# if ($self->_islimit_ed && (! $self->{'looking_at_effective_id'})) {
-# $self->SUPER::limit( column => 'EffectiveId',
+# $self->SUPER::limit( column => 'effective_id',
# operator => '=',
# quote_value => 0,
# value => 'main.id'); #TODO, we shouldn't be hard coding the tablename to main.
@@ -3145,7 +3145,7 @@
# We don't want deleted tickets unless 'allow_deleted_search' is set
unless ( $self->{'allow_deleted_search'} ) {
$self->SUPER::limit(
- column => 'Status',
+ column => 'status',
operator => '!=',
value => 'deleted',
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm Tue Jan 29 18:20:55 2008
@@ -78,7 +78,7 @@
# By default, order by the date of the transaction, rather than ID.
$self->order_by(
- { column => 'Created',
+ { column => 'created',
order => 'ASC'
},
{ column => 'id',
@@ -121,7 +121,7 @@
}
$self->limit(
alias => $self->{tickets_table},
- column => 'EffectiveId',
+ column => 'effective_id',
operator => '=',
entry_aggregator => 'OR',
value => $tid,
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 Tue Jan 29 18:20:55 2008
@@ -1155,11 +1155,11 @@
alias1 => $group_alias,
column1 => 'id',
table2 => 'CachedGroupMembers',
- column2 => 'GroupId',
+ column2 => 'group_id',
);
$watched_queues->limit(
alias => $queues_alias,
- column => 'MemberId',
+ column => 'member_id',
value => $self->principal_id,
);
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm Tue Jan 29 18:20:55 2008
@@ -197,12 +197,12 @@
alias1 => $self->principals_alias,
column1 => 'id',
alias2 => $groupalias,
- column2 => 'MemberId'
+ column2 => 'member_id'
);
$self->limit(
alias => "$groupalias",
- column => 'GroupId',
+ column => 'group_id',
value => "$group",
operator => "="
);
@@ -266,7 +266,7 @@
$self->join(
alias1 => $group_members,
- column1 => 'MemberId',
+ column1 => 'member_id',
alias2 => $principals,
column2 => 'id'
);
@@ -285,7 +285,7 @@
alias1 => $groups,
column1 => 'id',
alias2 => $group_members,
- column2 => 'GroupId'
+ column2 => 'group_id'
);
return $groups;
@@ -558,7 +558,7 @@
foreach my $groupid ( @{ $args{'Groups'} } ) {
$self->limit(
alias => $group_members,
- column => 'GroupId',
+ column => 'group_id',
value => $groupid,
quote_value => 0,
entry_aggregator => 'OR',
More information about the Rt-commit
mailing list