[Rt-commit] r10629 - in rt/branches/3.999-DANGEROUS: . docs/design_docs html/Admin/Elements html/Elements html/Ticket/Elements lib/RT lib/RT/Interface lib/RT/Model lib/RT/URI
jesse at bestpractical.com
jesse at bestpractical.com
Thu Jan 31 18:38:40 EST 2008
Author: jesse
Date: Thu Jan 31 18:38:39 2008
New Revision: 10629
Modified:
rt/branches/3.999-DANGEROUS/ (props changed)
rt/branches/3.999-DANGEROUS/docs/design_docs/delegation
rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField
rt/branches/3.999-DANGEROUS/html/Search/Bulk.html
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments
rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction
rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomFieldCollection.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/Transaction.pm
rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm
Log:
r76020 at pinglin: jesse | 2008-01-31 18:28:01 -0500
* CustomField -> custom_field
r76021 at pinglin: jesse | 2008-01-31 18:37:52 -0500
SelectStage instead of Selectstage
Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/delegation
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/delegation (original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/delegation Thu Jan 31 18:38:39 2008
@@ -26,7 +26,7 @@
=cut
-=item RightsForobject { object_type => 'Group', object_id =>'group_id' }
+=item RightsFor_object { object_type => 'Group', object_id =>'group_id' }
in users.pm
Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip (original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditScrip Thu Jan 31 18:38:39 2008
@@ -78,7 +78,7 @@
&></td></tr>
<tr><td align="right"><&|/l&>stage</&>:</td><td>
-<& /Admin/Elements/Selectstage,
+<& /Admin/Elements/SelectStage,
name => "Scrip-$id-stage",
Default => $ARGS{"Scrip-$id-stage"} || $scrip->stage,
&></td></tr>
Modified: rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField (original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField Thu Jan 31 18:38:39 2008
@@ -57,7 +57,7 @@
my $values;
if ( $object && $object->id ) {
$values = $object->custom_field_values( $CustomField->id );
- $values->columns( qw( id CustomField object_type object_id disabled Content content_type content_encoding ) );
+ $values->query_columns( qw( id custom_field object_type object_id disabled content content_type content_encoding ) );
$namePrefix ||= join('-', 'object', ref($object), $object->id, 'CustomField', '');
} elsif (not $Default) {
my %TOP = $m->request_args;
Modified: rt/branches/3.999-DANGEROUS/html/Search/Bulk.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Search/Bulk.html (original)
+++ rt/branches/3.999-DANGEROUS/html/Search/Bulk.html Thu Jan 31 18:38:39 2008
@@ -365,7 +365,7 @@
my $TxnCFs = RT::Model::CustomFieldCollection->new();
$TxnCFs->limit_to_lookup_type( RT::Model::Transaction->custom_field_lookup_type );
-$TxnCFs->limit_to_global_orobject_id( sort keys %queues );
+$TxnCFs->limit_to_global_or_object_id( sort keys %queues );
</%INIT>
<%args>
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments Thu Jan 31 18:38:39 2008
@@ -55,7 +55,7 @@
# code that looks at attachments will look at each one in turn.
my $attachments = RT::Model::AttachmentCollection->new();
-$attachments->columns( qw( id Filename content_type headers subject Parent content_encoding content_type transaction_id Created));
+$attachments->query_columns( qw( id filename content_type headers subject parent content_encoding content_type transaction_id created));
my $transactions = $attachments->new_alias('Transactions');
$attachments->join( alias1 => 'main',
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 Thu Jan 31 18:38:39 2008
@@ -49,7 +49,7 @@
my $attachments = RT::Model::AttachmentCollection->new();
-$attachments->columns( qw(id Content content_type transaction_id content_encoding));
+$attachments->query_columns( qw(id content content_type transaction_id content_encoding));
if ( $Ticket->current_user_has_right('ShowTicket') ) {
my $transactions = $attachments->new_alias('Transactions');
Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction (original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowTransaction Thu Jan 31 18:38:39 2008
@@ -153,7 +153,7 @@
unless ($Attachments) {
my $attachments = $Transaction->attachments;
- $attachments->columns( qw( id Filename content_type headers subject Parent content_encoding content_type transaction_id) );
+ $attachments->query_columns( qw( id filename content_type headers subject Parent content_encoding content_type transaction_id) );
$Attachments = $attachments->items_array_ref();
}
my $titlebar_commands = ' ';
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 Thu Jan 31 18:38:39 2008
@@ -600,11 +600,11 @@
# From/To/Cc headers that are on a top part
my $attachments = RT::Model::AttachmentCollection->new(
current_user => $txn->current_user );
- $attachments->columns(qw(id Parent transaction_id headers));
+ $attachments->query_columns(qw(id parent transaction_id headers));
$attachments->limit( column => 'transaction_id', value => $txn->id );
- $attachments->limit( column => 'Parent', value => 0 );
+ $attachments->limit( column => 'parent', value => 0 );
$attachments->limit(
- column => 'Parent',
+ column => 'parent',
operator => 'IS',
value => 'NULL',
quote_value => 0
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm Thu Jan 31 18:38:39 2008
@@ -128,13 +128,13 @@
our %FRIENDLY_OBJECT_TYPES = ();
-RT::Model::CustomField->_forobject_type(
+RT::Model::CustomField->_for_object_type(
'RT::Model::Queue-RT::Model::Ticket' => "Tickets", ); #loc
-RT::Model::CustomField->_forobject_type(
+RT::Model::CustomField->_for_object_type(
'RT::Model::Queue-RT::Model::Ticket-RT::Model::Transaction' =>
"Ticket Transactions", ); #loc
-RT::Model::CustomField->_forobject_type( 'RT::Model::User' => "Users", ); #loc
-RT::Model::CustomField->_forobject_type( 'RT::Model::Group' => "Groups", )
+RT::Model::CustomField->_for_object_type( 'RT::Model::User' => "Users", ); #loc
+RT::Model::CustomField->_for_object_type( 'RT::Model::Group' => "Groups", )
; #loc
our $RIGHTS = {
@@ -1129,7 +1129,7 @@
return ($values);
}
-=head2 _Forobject_type PATH friendly_name
+=head2 _For_object_type PATH friendly_name
Tell RT that a certain object accepts custom fields
@@ -1144,7 +1144,7 @@
=cut
-sub _forobject_type {
+sub _for_object_type {
my $self = shift;
my $path = shift;
my $friendly_name = shift;
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 Thu Jan 31 18:38:39 2008
@@ -95,7 +95,7 @@
sub limit_to_global_or_queue {
my $self = shift;
my $queue = shift;
- $self->limit_to_global_orobject_id($queue);
+ $self->limit_to_global_or_object_id($queue);
$self->limit_to_lookup_type('RT::Model::Queue-RT::Model::Ticket');
}
@@ -230,7 +230,7 @@
$self->limit( column => 'lookup_type', starts_with => "$lookup" );
}
-sub limit_to_global_orobject_id {
+sub limit_to_global_or_object_id {
my $self = shift;
my $global_only = 1;
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 Thu Jan 31 18:38:39 2008
@@ -598,7 +598,7 @@
my $cfs = RT::Model::CustomFieldCollection->new;
if ( $self->current_user_has_right('SeeQueue') ) {
- $cfs->limit_to_global_orobject_id( $self->id );
+ $cfs->limit_to_global_or_object_id( $self->id );
$cfs->limit_to_lookup_type('RT::Model::Queue-RT::Model::Ticket');
}
return ($cfs);
@@ -620,7 +620,7 @@
my $cfs = RT::Model::CustomFieldCollection->new;
if ( $self->current_user_has_right('SeeQueue') ) {
- $cfs->limit_to_global_orobject_id( $self->id );
+ $cfs->limit_to_global_or_object_id( $self->id );
$cfs->limit_to_lookup_type(
'RT::Model::Queue-RT::Model::Ticket-RT::Model::Transaction');
}
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 Thu Jan 31 18:38:39 2008
@@ -309,7 +309,7 @@
starts -- an ISO date describing the ticket\'s start date and time in GMT
due -- an ISO date describing the ticket\'s due date and time in GMT
mime_obj -- a MIME::Entity object with the content of the initial ticket request.
- CustomField-<n> -- a scalar or array of values for the customfield with the id <n>
+ custom_field-<n> -- a scalar or array of values for the customfield with the id <n>
Ticket links can be set up during create by passing the link type as a hask key and
the ticket id to be linked to as a value (or a URI when linking to other objects).
@@ -638,7 +638,7 @@
# {{{ Add all the custom fields
foreach my $arg ( keys %args ) {
- next unless $arg =~ /^CustomField-(\d+)$/i;
+ next unless $arg =~ /^custom_field-(\d+)$/i;
my $cfid = $1;
foreach my $value ( UNIVERSAL::isa( $args{$arg} => 'ARRAY' )
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 Thu Jan 31 18:38:39 2008
@@ -804,9 +804,9 @@
my $self = shift;
return _("comments added");
},
- CustomField => sub {
+ custom_field => sub {
my $self = shift;
- my $field = _('CustomField');
+ my $field = _('custom_field');
if ( $self->field ) {
my $cf = RT::Model::CustomField->new;
@@ -1102,7 +1102,7 @@
}
# Make sure the user can see the custom field before showing that it changed
- elsif ( $type eq 'CustomField' and my $cf_id = $self->__value('field') ) {
+ elsif ( $type eq 'custom_field' and my $cf_id = $self->__value('field') ) {
my $cf = RT::Model::CustomField->new;
$cf->load($cf_id);
return 0 unless $cf->current_user_has_right('SeeCustomField');
@@ -1241,7 +1241,7 @@
my $CFs = RT::Model::CustomFieldCollection->new;
$CFs->limit( column => 'name', value => $field );
$CFs->limit_to_lookup_type( $self->custom_field_lookup_type );
- $CFs->limit_to_global_orobject_id( $self->object->queue_obj->id );
+ $CFs->limit_to_global_or_object_id( $self->object->queue_obj->id );
$field = $CFs->first->id if $CFs->first;
}
}
Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm Thu Jan 31 18:38:39 2008
@@ -1333,7 +1333,7 @@
# XXX handle multiple types properly
$cfs->limit_to_lookup_type( $self->custom_field_lookup_type );
- $cfs->limit_to_global_orobject_id(
+ $cfs->limit_to_global_or_object_id(
$self->_lookup_id( $self->custom_field_lookup_type ) );
return $cfs;
@@ -1472,7 +1472,7 @@
}
my ( $transaction_id, $Msg, $transaction_obj )
= $self->_new_transaction(
- type => 'CustomField',
+ type => 'custom_field',
field => $cf->id,
old_reference => $value,
);
@@ -1534,7 +1534,7 @@
if ( $args{'record_transaction'} ) {
my ( $transaction_id, $Msg, $transaction_obj )
= $self->_new_transaction(
- type => 'CustomField',
+ type => 'custom_field',
field => $cf->id,
old_reference => $old_value,
new_reference => $new_value,
@@ -1574,7 +1574,7 @@
}
if ( $args{'record_transaction'} ) {
my ( $tid, $msg ) = $self->_new_transaction(
- type => 'CustomField',
+ type => 'custom_field',
field => $cf->id,
new_reference => $new_value_id,
reference_type => 'RT::Model::ObjectCustomFieldValue',
@@ -1627,7 +1627,7 @@
}
my ( $transaction_id, $Msg, $transaction_obj ) = $self->_new_transaction(
- type => 'CustomField',
+ type => 'custom_field',
field => $cf->id,
old_reference => $val,
reference_type => 'RT::Model::ObjectCustomFieldValue',
Modified: rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm (original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm Thu Jan 31 18:38:39 2008
@@ -87,7 +87,7 @@
return ($type);
}
-=head2 URIForobject RT::Record
+=head2 uri_for_object RT::Record
Returns the RT URI for a local RT::Record object
More information about the Rt-commit
mailing list