[Rt-commit] r10568 - rt/branches/3.999-DANGEROUS/lib/RT/Model

ruz at bestpractical.com ruz at bestpractical.com
Tue Jan 29 18:49:04 EST 2008


Author: ruz
Date: Tue Jan 29 18:49:04 2008
New Revision: 10568

Modified:
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripAction.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCondition.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm

Log:
* update our models, we can create our default DB again

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripAction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripAction.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripAction.pm	Tue Jan 29 18:49:04 2008
@@ -80,14 +80,14 @@
 use Jifty::DBI::Record schema {
     column name        => type is 'text';
     column description => type is 'text';
-    column ExecModule  => type is 'text';
+    column exec_module  => type is 'text';
     column argument    => type is 'text';
-    column Creator     => max_length is 11, type is 'int(11)', default is '0';
-    column Created => type is 'datetime', default is '';
+    column creator     => max_length is 11, type is 'int(11)', default is '0';
+    column created => type is 'datetime', default is '';
     column
-        LastUpdatedBy => max_length is 11,
+        last_updated_by => max_length is 11,
         type is 'int(11)', default is '0';
-    column LastUpdated => type is 'datetime', default is '';
+    column last_updated => type is 'datetime', default is '';
 
 };
 
@@ -150,7 +150,7 @@
 
 # {{{ sub loadAction
 
-=head2 LoadAction HASH
+=head2 load_action HASH
 
   Takes a hash consisting of ticket_obj and transaction_obj.  Loads an RT::ScripAction:: module.
 
@@ -176,7 +176,7 @@
     $self->{'Action'} = $type->new(
         argument        => $self->argument,
         CurrentUser     => $self->current_user,
-        ScripActionObj  => $self,
+        scrip_action_obj  => $self,
         scrip_obj       => $args{'scrip_obj'},
         template_obj    => $self->template_obj,
         ticket_obj      => $args{'ticket_obj'},

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCondition.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCondition.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCondition.pm	Tue Jan 29 18:49:04 2008
@@ -80,15 +80,15 @@
 use Jifty::DBI::Record schema {
     column name                 => type is 'text';
     column description          => type is 'text';
-    column ExecModule           => type is 'text';
+    column exec_module           => type is 'text';
     column argument             => type is 'text';
     column applicable_trans_types => type is 'text';
     column Creator => max_length is 11, type is 'int(11)', default is '0';
     column Created => type is 'datetime', default is '';
     column
-        LastUpdatedBy => max_length is 11,
+        last_updated_by => max_length is 11,
         type is 'int(11)', default is '0';
-    column LastUpdated => type is 'datetime', default is '';
+    column last_updated => type is 'datetime', default is '';
 
 };
 
@@ -152,7 +152,7 @@
 
 # {{{ sub loadCondition
 
-=head2 LoadCondition  HASH
+=head2 load_condition  HASH
 
 takes a hash which has the following elements:  transaction_obj and ticket_obj.
 Loads the Condition module in question.
@@ -175,7 +175,7 @@
     eval "require $type" || die "Require of $type failed.\n$@\n";
 
     $self->{'Condition'} = $type->new(
-        'ScripConditionObj'    => $self,
+        'scrip_condition_obj'    => $self,
         'ticket_obj'           => $args{'ticket_obj'},
         'scrip_obj'            => $args{'scrip_obj'},
         'transaction_obj'      => $args{'transaction_obj'},
@@ -205,11 +205,11 @@
 
 # }}}
 
-# {{{ sub IsApplicable
+# {{{ sub is_applicable
 
-=head2 IsApplicable
+=head2 is_applicable
 
-Helper method to call the condition module\'s IsApplicable method.
+Helper method to call the condition module\'s is_applicable method.
 
 =cut
 

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:49:04 2008
@@ -32,7 +32,7 @@
 
 use Jifty::DBI::Record schema {
     column comments              => type is 'blob', default is '';
-    column Signature             => type is 'blob', default is '';
+    column signature             => type is 'blob', default is '';
     column freeform_contact_info => type is 'blob', default is '';
     column
         organization =>,
@@ -60,18 +60,18 @@
     column
         auth_system => max_length is 30,
         type is 'varchar(30)', default is '';
-    column Gecos => max_length is 16, type is 'varchar(16)', default is '';
+    column gecos => max_length is 16, type is 'varchar(16)', default is '';
     column
-        HomePhone => max_length is 30,
+        home_phone => max_length is 30,
         type is 'varchar(30)', default is '';
     column
-        WorkPhone => max_length is 30,
+        work_phone => max_length is 30,
         type is 'varchar(30)', default is '';
     column
-        MobilePhone => max_length is 30,
+        mobile_phone => max_length is 30,
         type is 'varchar(30)', default is '';
     column
-        PagerPhone => max_length is 30,
+        pager_phone => max_length is 30,
         type is 'varchar(30)', default is '';
     column
         Address1 => max_length is 200,
@@ -79,10 +79,10 @@
     column
         Address2 => max_length is 200,
         type is 'varchar(200)', default is '';
-    column City  => max_length is 100, type is 'varchar(100)', default is '';
-    column State => max_length is 100, type is 'varchar(100)', default is '';
-    column Zip   => max_length is 16,  type is 'varchar(16)',  default is '';
-    column Country  => max_length is 50, type is 'varchar(50)', default is '';
+    column city  => max_length is 100, type is 'varchar(100)', default is '';
+    column state => max_length is 100, type is 'varchar(100)', default is '';
+    column zip   => max_length is 16,  type is 'varchar(16)',  default is '';
+    column country  => max_length is 50, type is 'varchar(50)', default is '';
     column timezone => max_length is 50, type is 'varchar(50)', default is '';
     column PGPKey   => type is 'text';
 
@@ -1079,7 +1079,7 @@
 
 # {{{ sub set_Preferences
 
-=head2 SetPreferences name/OBJ value
+=head2 set_preferences name/OBJ value
 
   Set user preferences associated with given object or name.
 
@@ -1100,7 +1100,7 @@
 
 # }}}
 
-=head2 WatchedQueues ROLE_LIST
+=head2 watched_queues ROLE_LIST
 
 Returns a RT::Model::QueueCollection object containing every queue watched by the user.
 
@@ -1263,7 +1263,7 @@
     my %args = (
         column             => undef,
         value              => undef,
-        TransactionType    => 'Set',
+        transaction_type    => 'Set',
         record_transaction => 1,
         @_
     );
@@ -1293,7 +1293,7 @@
     if ( $args{'record_transaction'} == 1 ) {
 
         my ( $Trans, $Msg, $TransObj ) = $self->_new_transaction(
-            type      => $args{'TransactionType'},
+            type      => $args{'transaction_type'},
             Field     => $args{'column'},
             new_value => $args{'value'},
             old_value => $Old,
@@ -1325,7 +1325,7 @@
 
     my %public_fields = map { $_ => 1 } qw( name email
         id organization disabled
-        real_name nickname Gecos ExternalAuthId
+        real_name nickname gecos ExternalAuthId
         auth_system ExternalContactInfoId
         ContactInfoSystem );
 


More information about the Rt-commit mailing list