[Rt-commit] r10553 - in rt/branches/3.999-DANGEROUS: html/Admin/CustomFields html/Admin/Elements html/Admin/Global html/Admin/Groups html/Admin/Queues html/Elements html/Elements/RT__Model__Ticket html/Prefs html/REST/1.0/Forms/ticket html/REST/1.0/Forms/transaction html/Ticket html/Ticket/Elements lib/RT/Condition lib/RT/Interface/Web/QueryBuilder lib/RT/Model lib/RT/ScripAction t/api

ruz at bestpractical.com ruz at bestpractical.com
Tue Jan 29 12:16:03 EST 2008


Author: ruz
Date: Tue Jan 29 12:16:03 2008
New Revision: 10553

Modified:
   rt/branches/3.999-DANGEROUS/html/Admin/CustomFields/GroupRights.html
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditQueueWatchers
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/ListGlobalCustomFields
   rt/branches/3.999-DANGEROUS/html/Admin/Global/GroupRights.html
   rt/branches/3.999-DANGEROUS/html/Admin/Groups/GroupRights.html
   rt/branches/3.999-DANGEROUS/html/Admin/Queues/GroupRights.html
   rt/branches/3.999-DANGEROUS/html/Admin/Queues/People.html
   rt/branches/3.999-DANGEROUS/html/Elements/EditLinks
   rt/branches/3.999-DANGEROUS/html/Elements/MyRT
   rt/branches/3.999-DANGEROUS/html/Elements/RT__Model__Ticket/ColumnMap
   rt/branches/3.999-DANGEROUS/html/Elements/ShowMemberships
   rt/branches/3.999-DANGEROUS/html/Prefs/Search.html
   rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/attachments
   rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/default
   rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/history
   rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/transaction/default
   rt/branches/3.999-DANGEROUS/html/Search/Bulk.html
   rt/branches/3.999-DANGEROUS/html/Ticket/Create.html
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/EditBasics
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowBasics
   rt/branches/3.999-DANGEROUS/lib/RT/Condition/PriorityExceeds.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Attachment.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ScripCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Ticket.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/EscalatePriority.pm
   rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SetPriority.pm
   rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t
   rt/branches/3.999-DANGEROUS/t/api/groups.t
   rt/branches/3.999-DANGEROUS/t/api/queue.t
   rt/branches/3.999-DANGEROUS/t/api/rights.t
   rt/branches/3.999-DANGEROUS/t/api/scrip.t
   rt/branches/3.999-DANGEROUS/t/api/scrip_order.t
   rt/branches/3.999-DANGEROUS/t/api/template-insert.t
   rt/branches/3.999-DANGEROUS/t/api/ticket.t
   rt/branches/3.999-DANGEROUS/t/api/user.t

Log:
* more API changes and fixes

Modified: rt/branches/3.999-DANGEROUS/html/Admin/CustomFields/GroupRights.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/CustomFields/GroupRights.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/CustomFields/GroupRights.html	Tue Jan 29 12:16:03 2008
@@ -64,7 +64,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditQueueWatchers
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditQueueWatchers	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditQueueWatchers	Tue Jan 29 12:16:03 2008
@@ -53,7 +53,7 @@
 <ul>
 % while (my $watcher=$Members->next) {
 <li>
-<input type="checkbox" class="checkbox" name="Queue-<%$queue_obj->id%>-DeleteWatcher-Type-<%$Watchers->Type%>-Principal-<%$watcher->MemberId%>" value="1"
+<input type="checkbox" class="checkbox" name="Queue-<%$queue_obj->id%>-DeleteWatcher-Type-<%$Watchers->type%>-Principal-<%$watcher->MemberId%>" value="1"
         unchecked />
 % if ($watcher->member_obj->is_user) { 
 <a href="<%RT->config->get('WebPath')%>/Admin/Users/Modify.html?id=<%$watcher->member_obj->object_id%>">

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/ListGlobalCustomFields
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/ListGlobalCustomFields	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/ListGlobalCustomFields	Tue Jan 29 12:16:03 2008
@@ -48,7 +48,7 @@
 %   my $count = 0;
 %   while (my $CustomFieldObj = $CustomFields->next) { 
 %   $count++;
-<font size="-1"><%$CustomFieldObj->id%>/<% _($CustomFieldObj->Type) %>/<%$CustomFieldObj->name%>: <%$CustomFieldObj->Description%></font>
+<font size="-1"><%$CustomFieldObj->id%>/<% _($CustomFieldObj->type) %>/<%$CustomFieldObj->name%>: <%$CustomFieldObj->Description%></font>
 <br />
 %   }
 %   if (!$count) {

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Global/GroupRights.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Global/GroupRights.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Global/GroupRights.html	Tue Jan 29 12:16:03 2008
@@ -62,7 +62,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,
@@ -78,7 +78,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Groups/GroupRights.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Groups/GroupRights.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Groups/GroupRights.html	Tue Jan 29 12:16:03 2008
@@ -64,7 +64,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Queues/GroupRights.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Queues/GroupRights.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Queues/GroupRights.html	Tue Jan 29 12:16:03 2008
@@ -64,7 +64,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,
@@ -80,7 +80,7 @@
 %	while (my $Group = $Groups->next()) {
   <tr align="right"> 
 	<td valign="top">
-	    <% _($Group->Type) %>
+	    <% _($Group->type) %>
 		  </td>
 	  <td>
 	    <& /Admin/Elements/SelectRights, principal_id => $Group->principal_id,

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Queues/People.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Queues/People.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Queues/People.html	Tue Jan 29 12:16:03 2008
@@ -152,7 +152,7 @@
         my $id = $queue_obj->id;
 
     if (($key =~ /^Queue-$id-DeleteWatcher-Type-(.*?)-Principal-(\d*)$/)) {;
-	    my ($code, $msg) = $queue_obj->delete_watcher(Type => $1,
+	    my ($code, $msg) = $queue_obj->delete_watcher(type => $1,
                                                     principal_id => $2);
 	    push @results, $msg;
     }
@@ -165,7 +165,7 @@
     if ( ($ARGS{$key} =~ /^(AdminCc|Cc)$/) and
 	 ($key =~ /^Queue-AddWatcher-Principal-(\d*)$/) ) {
 	Jifty->log->debug("Adding a watcher $1 to ".$ARGS{$key}."\n");
-	my ($code, $msg) = $queue_obj->add_watcher(Type => $ARGS{$key},
+	my ($code, $msg) = $queue_obj->add_watcher(type => $ARGS{$key},
 				                             principal_id => $1);
 	push @results, $msg;
     }

Modified: rt/branches/3.999-DANGEROUS/html/Elements/EditLinks
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/EditLinks	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/EditLinks	Tue Jan 29 12:16:03 2008
@@ -59,7 +59,7 @@
     <td class="labeltop"><&|/l&>Depends on</&>:</td>
     <td class="value">
 % while (my $link = $Object->depends_on->next) {
-      <input type="checkbox" class="checkbox" name="delete_link--<%$link->Type%>-<%$link->Target%>" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link--<%$link->type%>-<%$link->Target%>" value="1" />
         <& ShowLink, URI => $link->target_uri &><br />
 % }
     </td>
@@ -68,7 +68,7 @@
     <td class="labeltop"><&|/l&>Depended on by</&>:</td>
     <td class="value">
 % while (my $link = $Object->depended_on_by->next) {
-      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->Type%>-" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->type%>-" value="1" />
         <& ShowLink, URI => $link->base_uri &><br />
 % }
     </td>
@@ -77,7 +77,7 @@
     <td class="labeltop"><&|/l&>Parents</&>:</td>
     <td class="value">
 % while (my $link = $Object->member_of->next) {
-      <input type="checkbox" class="checkbox" name="delete_link--<%$link->Type%>-<%$link->Target%>" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link--<%$link->type%>-<%$link->Target%>" value="1" />
         <& ShowLink, URI => $link->target_uri &><br />
 % }
     </td>
@@ -86,7 +86,7 @@
     <td class="labeltop"><&|/l&>Children</&>:</td>
     <td class="value">
 % while (my $link = $Object->members->next) {
-      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->Type%>-" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->type%>-" value="1" />
         <& ShowLink, URI => $link->base_uri &><br />
 % }
     </td>
@@ -95,7 +95,7 @@
     <td class="labeltop"><&|/l&>Refers to</&>:</td>
     <td class="value">
 % while (my $link = $Object->refers_to->next) {
-      <input type="checkbox" class="checkbox" name="delete_link--<%$link->Type%>-<%$link->Target%>" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link--<%$link->type%>-<%$link->Target%>" value="1" />
         <& ShowLink, URI => $link->target_uri &><br />
 %}
     </td>
@@ -106,7 +106,7 @@
 % while (my $link = $Object->referred_to_by->next) {
 % # Skip reminders
 % next if (UNIVERSAL::isa($link->base_obj, 'RT::Model::Ticket')  && $link->base_obj->type eq 'reminder');
-      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->Type%>-" value="1" />
+      <input type="checkbox" class="checkbox" name="delete_link-<%$link->Base%>-<%$link->type%>-" value="1" />
         <& ShowLink, URI => $link->base_uri &><br />
 % }
     </td>

Modified: rt/branches/3.999-DANGEROUS/html/Elements/MyRT
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/MyRT	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/MyRT	Tue Jan 29 12:16:03 2008
@@ -69,7 +69,7 @@
 unless ( $Portlets ) {
     my ($default_portlets) = RT::System->new()->attributes->named('HomepageSettings');
     $Portlets = $session{'my_rt_portlets'} = $user->preferences(
-        HomepageSettings => $default_portlets? $default_portlets->Content: {},
+        HomepageSettings => $default_portlets? $default_portlets->content: {},
     );
 }
 

Modified: rt/branches/3.999-DANGEROUS/html/Elements/RT__Model__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/RT__Model__Ticket/ColumnMap	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/RT__Model__Ticket/ColumnMap	Tue Jan 29 12:16:03 2008
@@ -117,7 +117,7 @@
     },
     Priority => {
         attribute => 'Priority',
-        value     => sub  { return $_[0]->Priority }
+        value     => sub  { return $_[0]->priority }
     },
     initial_priority => {
         attribute => 'initial_priority',

Modified: rt/branches/3.999-DANGEROUS/html/Elements/ShowMemberships
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/ShowMemberships	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/ShowMemberships	Tue Jan 29 12:16:03 2008
@@ -52,7 +52,7 @@
 %    if ($Group->domain eq 'UserDefined') {
 <li><a href="<%RT->config->get('WebPath')%>/Admin/Groups/Modify.html?id=<% $Group->id %>"><% $Group->name %></a></li>
 %    } elsif ($Group->domain eq 'SystemInternal') {
-<li><em><% _($Group->Type) %></em></li>
+<li><em><% _($Group->type) %></em></li>
 %    }
 % }
 </ul>

Modified: rt/branches/3.999-DANGEROUS/html/Prefs/Search.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Prefs/Search.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Prefs/Search.html	Tue Jan 29 12:16:03 2008
@@ -87,7 +87,7 @@
 $search->load_by_id ($id);
 $title .= _($search->description, _('"N"'));
 my $user = Jifty->web->current_user->user_object;
-my $SearchArg = $user->preferences($search, $search->Content);
+my $SearchArg = $user->preferences($search, $search->content);
 $ARGS{Order}       = (ref $ARGS{Order}   ? join('|',grep {/\S/} @{$ARGS{Order}})   : $ARGS{Order});
 $ARGS{order_by}     = (ref $ARGS{order_by} ? join('|',grep {/\S/} @{$ARGS{order_by}}) : $ARGS{order_by});
 for (@fields) {

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	Tue Jan 29 12:16:03 2008
@@ -115,7 +115,7 @@
     while (my $t = $transactions->next) {
         my $attachments = $t->attachments;
         while (my $a = $attachments->next) {
-            my $size = length($a->Content) || 0;
+            my $size = length($a->content) || 0;
             if ($size > 1024) { $size  = int($size/102.4)/10 . "k" }
             else              { $size .= "b" }
             push @attachments, $a->id.": ".($a->filename || '(Unnamed)')." (".$a->content_type . " / ".$size.")";

Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/default
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/default	(original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/default	Tue Jan 29 12:16:03 2008
@@ -278,7 +278,7 @@
 
             foreach $p (keys %old) {
                 unless (exists $new{$p}) {
-                    ($s, $n) = $ticket->delete_watcher(Type => $type,
+                    ($s, $n) = $ticket->delete_watcher(type => $type,
                                                       Email => $p);
                     push @msgs, [ $s, $n ];
                 }
@@ -291,8 +291,8 @@
                     push @msgs, [ $s, $n ];
                     next;
                 }
-                unless ($ticket->is_watcher(Type => $type, Email => $p)) {
-                    ($s, $n) = $ticket->add_watcher(Type => $type,
+                unless ($ticket->is_watcher(type => $type, Email => $p)) {
+                    ($s, $n) = $ticket->add_watcher(type => $type,
                                                    Email => $p);
                     push @msgs, [ $s, $n ];
                 }

Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/history
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/history	(original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/ticket/history	Tue Jan 29 12:16:03 2008
@@ -149,7 +149,7 @@
 	my $attachlist;
 	my $attachments = $t->attachments;
 	while (my $a = $attachments->next) {
-	    my $size = length($a->Content);
+	    my $size = length($a->content);
 	    if ($size > 1024) { $size  = int($size/102.4)/10 . "k" }
 	    else              { $size .= "b" }
 	    $attachlist .= "\n" . $a->id.": ".($a->filename || "untitled")." (".$size.")";

Modified: rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/transaction/default
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/transaction/default	(original)
+++ rt/branches/3.999-DANGEROUS/html/REST/1.0/Forms/transaction/default	Tue Jan 29 12:16:03 2008
@@ -100,7 +100,7 @@
   	    my $attachlist;
   	    my $attachments = $t->attachments;
   	    while (my $a = $attachments->next) {
-  	      my $size = length($a->Content);
+  	      my $size = length($a->content);
   	      if ($size > 1024) {
   	        $size  = int($size/102.4)/10 . "k";
   	      }

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	Tue Jan 29 12:16:03 2008
@@ -180,7 +180,7 @@
 <td><& /Elements/EditCustomFieldText, @add &></td>
 <td>&nbsp;</td>
 % } else {
-%   Jifty->log->fatal("Unknown CustomField type: " . $cf->Type);
+%   Jifty->log->fatal("Unknown CustomField type: " . $cf->type);
 % }
 </tr>
 % }

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Create.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Create.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Create.html	Tue Jan 29 12:16:03 2008
@@ -252,7 +252,7 @@
         Requestors       => join( ',', $cloneticket_obj->requestor_addresses ),
         Cc               => join( ',', $cloneticket_obj->CcAddresses),
         AdminCc          => join( ',', $cloneticket_obj->AdminCcAddresses),
-        initial_priority => $cloneticket_obj->Priority, 
+        initial_priority => $cloneticket_obj->priority, 
     };
     
     $clone->{$_} = $cloneticket_obj->$_() 

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/EditBasics
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/EditBasics	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/EditBasics	Tue Jan 29 12:16:03 2008
@@ -96,7 +96,7 @@
   <tr>
       <td class="label"><&|/l&>Priority</&>:</td>
       <td class="value"><input name="Priority" 
-        value="<%$ticket_obj->Priority || ''|h%>" size="5" /></td>
+        value="<%$ticket_obj->priority || ''|h%>" size="5" /></td>
     </tr>
 
   <tr>

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/PreviewScrips	Tue Jan 29 12:16:03 2008
@@ -87,7 +87,7 @@
 <br />
 <ul>
 % foreach my $recipient (@non_recipients) {
-<li><input type="checkbox" class="checkbox" name="Ticket-<%$ticket_obj->id%>-UnsquelchMailTo" value="<%$recipient->Content%>" />
+<li><input type="checkbox" class="checkbox" name="Ticket-<%$ticket_obj->id%>-UnsquelchMailTo" value="<%$recipient->content%>" />
 <% $recipient->content %>
 % }
 </ul>

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowBasics
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowBasics	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/ShowBasics	Tue Jan 29 12:16:03 2008
@@ -74,7 +74,7 @@
 % }
   <tr>
     <td class="label priority"><&|/l&>Priority</&>:</td>
-    <td class="value priority"><%$Ticket->Priority||0%>/<%$Ticket->final_priority||0 %></td>
+    <td class="value priority"><%$Ticket->priority||0%>/<%$Ticket->final_priority||0 %></td>
   </tr>
   <tr>
     <td class="label queue"><&|/l&>Queue</&>:</td>

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Condition/PriorityExceeds.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Condition/PriorityExceeds.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Condition/PriorityExceeds.pm	Tue Jan 29 12:16:03 2008
@@ -61,7 +61,7 @@
 
 sub is_applicable {
     my $self = shift;
-    if ( $self->ticket_obj->Priority > $self->argument ) {
+    if ( $self->ticket_obj->priority > $self->argument ) {
         return (1);
     } else {
         return (undef);

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Web/QueryBuilder/Tree.pm	Tue Jan 29 12:16:03 2008
@@ -277,7 +277,7 @@
     $callback{'Error'} = sub { push @results, @_ };
 
     require RT::SQL;
-    RT::SQL::Parse( $string, \%callback );
+    RT::SQL::parse( $string, \%callback );
     return @results;
 }
 

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 12:16:03 2008
@@ -48,7 +48,7 @@
         subject => max_length is 255,
         type is 'varchar(255)', default is '';
 
-    column Content         => type is 'blob', default is '';
+    column content         => type is 'blob', default is '';
     column ContentEncoding => type is 'blob', default is '';
     column Headers         => type is 'blob', default is '';
     column Creator => max_length is 11, type is 'int(11)', default is '0';
@@ -150,7 +150,7 @@
             parent          => $args{'parent'},
             Headers         => $Attachment->head->as_string,
             subject         => $subject,
-            Content         => $Body,
+            content         => $Body,
             Filename        => $Filename,
             MessageId       => $MessageId,
         );
@@ -174,8 +174,8 @@
     my $self = shift;
     my %args = ( ContentEncoding => 'none', @_ );
 
-    ( $args{'ContentEncoding'}, $args{'Content'} )
-        = $self->_encode_lob( $args{'Content'}, $args{'MimeType'} );
+    ( $args{'ContentEncoding'}, $args{'content'} )
+        = $self->_encode_lob( $args{'content'}, $args{'MimeType'} );
 
     return ( $self->SUPER::create(%args) );
 }
@@ -236,7 +236,7 @@
     return ($kids);
 }
 
-=head2 Content
+=head2 content
 
 Returns the attachment's content. if it's base64 encoded, decode it 
 before returning it.
@@ -246,7 +246,7 @@
 sub content {
     my $self = shift;
     return $self->_decode_lob( $self->content_type, $self->ContentEncoding,
-        $self->_value( 'Content', decode_utf8 => 0 ),
+        $self->_value( 'content', decode_utf8 => 0 ),
     );
 }
 
@@ -267,13 +267,13 @@
 
     my $content;
     if ( !$self->ContentEncoding || $self->ContentEncoding eq 'none' ) {
-        $content = $self->_value( 'Content', decode_utf8 => 0 );
+        $content = $self->_value( 'content', decode_utf8 => 0 );
     } elsif ( $self->ContentEncoding eq 'base64' ) {
         $content = MIME::Base64::decode_base64(
-            $self->_value( 'Content', decode_utf8 => 0 ) );
+            $self->_value( 'content', decode_utf8 => 0 ) );
     } elsif ( $self->ContentEncoding eq 'quoted-printable' ) {
         $content = MIME::QuotedPrint::decode(
-            $self->_value( 'Content', decode_utf8 => 0 ) );
+            $self->_value( 'content', decode_utf8 => 0 ) );
     } else {
         return ( _( "Unknown ContentEncoding %1", $self->ContentEncoding ) );
     }
@@ -311,7 +311,7 @@
 
 =head2 content_length
 
-Returns length of L</Content> in bytes.
+Returns length of L</content> in bytes.
 
 =cut
 
@@ -324,7 +324,7 @@
     unless ( defined $len ) {
         use bytes;
         no warnings 'uninitialized';
-        $len = length( $self->Content );
+        $len = length( $self->content );
         $self->set_header( 'Content-Length' => $len );
     }
     return $len;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	Tue Jan 29 12:16:03 2008
@@ -255,7 +255,7 @@
     my $url = shift;
 
     $url =~ s/__id__/@{[$self->object_id]}/g;
-    $url =~ s/__CustomField__/@{[$self->Content]}/g;
+    $url =~ s/__CustomField__/@{[$self->content]}/g;
 
     return $url;
 }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm	Tue Jan 29 12:16:03 2008
@@ -86,8 +86,7 @@
 
 sub is_group {
     my $self = shift;
-    if ( defined $self->principal_type
-        && $self->principal_type eq 'Group' )
+    if ( lc( $self->principal_type ||'') eq 'group' )
     {
         return 1;
     }
@@ -571,8 +570,7 @@
 sub _get_principal_type_for_acl {
     my $self = shift;
     my $type;
-    if (   $self->principal_type eq 'Group'
-        && $self->object->domain =~ /Role$/ )
+    if (   $self->is_group && $self->object->domain =~ /Role$/ )
     {
         $type = $self->object->type;
     } else {

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 12:16:03 2008
@@ -365,7 +365,7 @@
     );
 
     # Promise some kind of ordering
-    $self->order_by( column => 'Description' );
+    $self->order_by( column => 'description' );
 
     # we call Count below, but later we always do search
     # so just do search and get count from 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	Tue Jan 29 12:16:03 2008
@@ -87,7 +87,7 @@
     column subject => max_length is 200, type is 'varchar(200)', default is '';
     column initial_priority => max_length is 11, type is 'int(11)', default is '0';
     column final_priority => max_length is 11, type is 'int(11)', default is '0';
-    column Priority => max_length is 11, type is 'int(11)', default is '0';
+    column priority => max_length is 11, type is 'int(11)', default is '0';
     column
         time_estimated => max_length is 11,
         type is 'int(11)', default is '0';
@@ -299,7 +299,7 @@
   type -- The ticket\'s type. ignore this for now
   Owner -- This ticket\'s owner. either an RT::Model::User object or this user\'s id
   subject -- A string describing the subject of the ticket
-  Priority -- an integer from 0 to 99
+  priority -- an integer from 0 to 99
   initial_priority -- an integer from 0 to 99
   final_priority -- an integer from 0 to 99
   status -- any valid status (Defined in RT::Model::Queue)
@@ -343,7 +343,7 @@
         subject             => '',
         initial_priority    => undef,
         final_priority      => undef,
-        Priority            => undef,
+        priority            => undef,
         status              => 'new',
         time_worked         => "0",
         time_left           => 0,
@@ -398,7 +398,7 @@
 
     #Since we have a queue, we can set queue defaults
 
-  #Initial Priority
+  #Initial priority
   # If there's no queue default initial priority and it's not set, set it to 0
     $args{'initial_priority'} = $queue_obj->initial_priority || 0
         unless defined $args{'initial_priority'};
@@ -408,10 +408,10 @@
     $args{'final_priority'} = $queue_obj->final_priority || 0
         unless defined $args{'final_priority'};
 
-    # Priority may have changed from initial_priority, for the case
+    # priority may have changed from initial_priority, for the case
     # where we're importing tickets (eg, from an older RT version.)
-    $args{'Priority'} = $args{'initial_priority'}
-        unless defined $args{'Priority'};
+    $args{'priority'} = $args{'initial_priority'}
+        unless defined $args{'priority'};
 
     # {{{ Dates
     #TODO we should see what sort of due date we're getting, rather +
@@ -543,7 +543,7 @@
         subject          => $args{'subject'},
         initial_priority => $args{'initial_priority'},
         final_priority   => $args{'final_priority'},
-        Priority         => $args{'Priority'},
+        priority         => $args{'priority'},
         status           => $args{'status'},
         time_worked      => $args{'time_worked'},
         time_estimated   => $args{'time_estimated'},
@@ -993,7 +993,7 @@
         subject          => $args{'subject'},             # loc
         initial_priority => $args{'initial_priority'},    # loc
         final_priority   => $args{'final_priority'},      # loc
-        Priority         => $args{'initial_priority'},    # loc
+        priority         => $args{'initial_priority'},    # loc
         status           => $args{'status'},              # loc
         time_worked      => $args{'time_worked'},         # loc
         type             => $args{'type'},                # loc
@@ -3367,7 +3367,7 @@
         subject          => { 'read' => 1, 'write' => 1 },
         initial_priority => { 'read' => 1, 'write' => 1 },
         final_priority   => { 'read' => 1, 'write' => 1 },
-        Priority         => { 'read' => 1, 'write' => 1 },
+        priority         => { 'read' => 1, 'write' => 1 },
         status           => { 'read' => 1, 'write' => 1 },
         time_estimated   => { 'read' => 1, 'write' => 1 },
         time_worked      => { 'read' => 1, 'write' => 1 },

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/CreateTickets.pm	Tue Jan 29 12:16:03 2008
@@ -996,7 +996,7 @@
     $string .= "time_worked: " . $t->time_worked . "\n";
     $string .= "time_estimated: " . $t->time_estimated . "\n";
     $string .= "time_left: " . $t->time_left . "\n";
-    $string .= "initial_priority: " . $t->Priority . "\n";
+    $string .= "initial_priority: " . $t->priority . "\n";
     $string .= "final_priority: " . $t->final_priority . "\n";
 
     foreach my $type ( sort keys %LINKTYPEMAP ) {
@@ -1047,7 +1047,7 @@
     $string .= "time_worked: " . $t->time_worked . "\n";
     $string .= "time_estimated: " . $t->time_estimated . "\n";
     $string .= "time_left: " . $t->time_left . "\n";
-    $string .= "initial_priority: " . $t->Priority . "\n";
+    $string .= "initial_priority: " . $t->priority . "\n";
     $string .= "final_priority: " . $t->final_priority . "\n";
 
     return $string;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/EscalatePriority.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/EscalatePriority.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/EscalatePriority.pm	Tue Jan 29 12:16:03 2008
@@ -95,7 +95,7 @@
 sub prepare {
     my $self = shift;
 
-    if ($self->ticket_obj->Priority() == $self->ticket_obj->final_priority() )
+    if ($self->ticket_obj->priority() == $self->ticket_obj->final_priority() )
     {
 
         # no update necessary.
@@ -108,14 +108,14 @@
     # If we don't have a due date, adjust the priority by one
     # until we hit the final priority
     if ( $due->unix() < 1 ) {
-        if ( $self->ticket_obj->Priority > $self->ticket_obj->final_priority )
+        if ( $self->ticket_obj->priority > $self->ticket_obj->final_priority )
         {
-            $self->{'prio'} = ( $self->ticket_obj->Priority - 1 );
+            $self->{'prio'} = ( $self->ticket_obj->priority - 1 );
             return 1;
         } elsif (
-            $self->ticket_obj->Priority < $self->ticket_obj->final_priority )
+            $self->ticket_obj->priority < $self->ticket_obj->final_priority )
         {
-            $self->{'prio'} = ( $self->ticket_obj->Priority + 1 );
+            $self->{'prio'} = ( $self->ticket_obj->priority + 1 );
             return 1;
         }
 
@@ -138,12 +138,12 @@
             # final priority
 
             my $prio_delta = $self->ticket_obj->final_priority()
-                - $self->ticket_obj->Priority;
+                - $self->ticket_obj->priority;
 
             my $inc_priority_by = int( $prio_delta / $diff_in_days );
 
             #set the ticket's priority to that amount
-            $self->{'prio'} = $self->ticket_obj->Priority + $inc_priority_by;
+            $self->{'prio'} = $self->ticket_obj->priority + $inc_priority_by;
 
         }
 
@@ -160,7 +160,7 @@
 
 sub commit {
     my $self = shift;
-    my ( $val, $msg ) = $self->ticket_obj->set_Priority( $self->{'prio'} );
+    my ( $val, $msg ) = $self->ticket_obj->set_priority( $self->{'prio'} );
 
     unless ($val) {
         Jifty->log->debug( $self . " $msg\n" );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SetPriority.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SetPriority.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/ScripAction/SetPriority.pm	Tue Jan 29 12:16:03 2008
@@ -80,7 +80,7 @@
 sub commit {
     my $self = shift;
     Jifty->log->debug( "Committing the setprio");
-    $self->ticket_obj->set_Priority( $self->argument );
+    $self->ticket_obj->set_priority( $self->argument );
 
 }
 

Modified: rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/condition-ownerchange.t	Tue Jan 29 12:16:03 2008
@@ -21,7 +21,11 @@
              CustomIsApplicableCode => '',
              CustomPrepareCode => 'return 1',
              CustomCommitCode => '
-                    $self->ticket_obj->set_Priority($self->ticket_obj->Priority+1);
+                my ($status, $msg) = $self->ticket_obj->set_priority($self->ticket_obj->priority+1);
+                unless ( $status ) {
+                    Jifty->log->error($msg);
+                    return (0);
+                }
                 return(1);
             ',
              Template => 'Blank'
@@ -35,13 +39,13 @@
                                     );
 ok($tv, $tm);
 ok($ticket->set_owner('root'));
-is ($ticket->Priority , '21', "Ticket priority is set right");
+is ($ticket->priority , '21', "Ticket priority is set right");
 ok($ticket->steal);
-is ($ticket->Priority , '22', "Ticket priority is set right");
+is ($ticket->priority , '22', "Ticket priority is set right");
 ok($ticket->untake);
-is ($ticket->Priority , '23', "Ticket priority is set right");
+is ($ticket->priority , '23', "Ticket priority is set right");
 ok($ticket->take);
-is ($ticket->Priority , '24', "Ticket priority is set right");
+is ($ticket->priority , '24', "Ticket priority is set right");
 
 
 

Modified: rt/branches/3.999-DANGEROUS/t/api/groups.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/groups.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/groups.t	Tue Jan 29 12:16:03 2008
@@ -70,7 +70,7 @@
 ($id, $msg) = $global_admin_cc->principal_object->grant_right(Right =>'OwnTicket', Object=> RT->system);
 ok ($id,$msg);
 ok (!$testuser->has_right(Object => $q, Right => 'OwnTicket') , "The test user does not have the right to own tickets in the test queue");
-($id, $msg) = $q->add_watcher(Type => 'AdminCc', principal_id => $testuser->id);
+($id, $msg) = $q->add_watcher(type => 'AdminCc', principal_id => $testuser->id);
 ok($id,$msg);
 ok ($testuser->has_right(Object => $q, Right => 'OwnTicket') , "The test user does have the right to own tickets now. thank god.");
 

Modified: rt/branches/3.999-DANGEROUS/t/api/queue.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/queue.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/queue.t	Tue Jan 29 12:16:03 2008
@@ -75,25 +75,25 @@
                 );
 ok ($id, "Foo $id was Created");
 ok(my $group = RT::Model::Group->new(current_user => RT->system_user));
-ok($group->load_queue_role_group(Queue => $id, Type=> 'Requestor'));
+ok($group->load_queue_role_group(queue => $id, type=> 'Requestor'));
 ok ($group->id, "Found the ccs object for this Queue");
 
 
-ok (my ($add_id, $add_msg) = $Queue->add_watcher(Type => 'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a cc");
+ok (my ($add_id, $add_msg) = $Queue->add_watcher(type => 'Cc', Email => 'bob at fsck.com'), "Added bob at fsck.com as a cc");
 ok ($add_id, "Add succeeded: ($add_msg)");
 ok(my $bob = RT::Model::User->new(current_user => RT->system_user), "Creating a bob rt::user");
 $bob->load_by_email('bob at fsck.com');
 ok($bob->id,  "Found the bob rt user");
-ok ($Queue->is_watcher(Type => 'Cc', principal_id => $bob->principal_id), "The Queue actually has bob at fsck.com as a cc");;
-ok (($add_id, $add_msg) = $Queue->delete_watcher(Type =>'Cc', principal_id => $bob->principal_id ), "Removed bob at fsck.com as a cc");
-ok (!$Queue->is_watcher(Type => 'Cc', principal_id => $bob->principal_id), "The Queue no longer has bob at fsck.com as a cc");;
+ok ($Queue->is_watcher(type => 'Cc', principal_id => $bob->principal_id), "The Queue actually has bob at fsck.com as a cc");;
+ok (($add_id, $add_msg) = $Queue->delete_watcher(type =>'Cc', principal_id => $bob->principal_id ), "Removed bob at fsck.com as a cc");
+ok (!$Queue->is_watcher(type => 'Cc', principal_id => $bob->principal_id), "The Queue no longer has bob at fsck.com as a cc");;
 
 
 $group = RT::Model::Group->new(current_user => RT->system_user);
-ok($group->load_queue_role_group(Queue => $id, Type=> 'Cc'));
+ok($group->load_queue_role_group(queue => $id, type=> 'Cc'));
 ok ($group->id, "Found the cc object for this Queue");
 $group = RT::Model::Group->new(current_user => RT->system_user);
-ok($group->load_queue_role_group(Queue => $id, Type=> 'AdminCc'));
+ok($group->load_queue_role_group(queue => $id, type=> 'AdminCc'));
 ok ($group->id, "Found the AdminCc object for this Queue");
 
 

Modified: rt/branches/3.999-DANGEROUS/t/api/rights.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/rights.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/rights.t	Tue Jan 29 12:16:03 2008
@@ -119,7 +119,7 @@
 ok( $ace_id, "Granted queue AdminCc role group with ModifyTicket right: $msg" );
 ok( $group->principal_object->has_right( Right => 'ModifyTicket', Object => $queue ), "role group can modify ticket" );
 ok( !$user->has_right( Right => 'ModifyTicket', Object => $ticket ), "user is not AdminCc and can't modify ticket" );
-($status, $msg) = $ticket->add_watcher(Type => 'AdminCc', principal_id => $user->principal_id);
+($status, $msg) = $ticket->add_watcher(type => 'AdminCc', principal_id => $user->principal_id);
 ok( $status, "successfuly added user as AdminCc");
 ok( $user->has_right( Right => 'ModifyTicket', Object => $ticket ), "user is AdminCc and can modify ticket" );
 

Modified: rt/branches/3.999-DANGEROUS/t/api/scrip.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/scrip.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/scrip.t	Tue Jan 29 12:16:03 2008
@@ -20,7 +20,7 @@
              ScripCondition => 'User Defined',
              CustomIsApplicableCode => 'if ($self->ticket_obj->subject =~ /fire/) { return (1);} else { return(0)}',
              CustomPrepareCode => 'return 1',
-             CustomCommitCode => '$self->ticket_obj->__set(column =>"Priority", value => "87");',
+             CustomCommitCode => '$self->ticket_obj->__set(column =>"priority", value => "87");',
              Template => 'Blank'
     );
 ok($val,$msg);
@@ -31,7 +31,7 @@
                                     );
 ok($tv, $tm);
 
-is ($ticket->Priority , '87', "Ticket priority is set right");
+is ($ticket->priority , '87', "Ticket priority is set right");
 
 
 my $ticket2 = RT::Model::Ticket->new(current_user => RT->system_user);
@@ -40,7 +40,7 @@
                                     );
 ok($t2v, $t2m);
 
-isnt ($ticket2->Priority , '87', "Ticket priority is set right");
+isnt ($ticket2->priority , '87', "Ticket priority is set right");
 
 
 

Modified: rt/branches/3.999-DANGEROUS/t/api/scrip_order.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/scrip_order.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/scrip_order.t	Tue Jan 29 12:16:03 2008
@@ -16,12 +16,12 @@
 
 my $priority_ten_scrip = RT::Model::Scrip->new(current_user => RT->system_user);
 (my $id, $msg) = $priority_ten_scrip->create( 
-    Description => "10 set priority $$",
+    description => "10 set priority $$",
     Queue => $queue_id, 
     ScripCondition => 'On Create',
     ScripAction => 'User Defined', 
     CustomPrepareCode => 'Jifty->log->debug("Setting priority to 10..."); return 1;',
-    CustomCommitCode => '$self->ticket_obj->set_Priority(10);',
+    CustomCommitCode => '$self->ticket_obj->set_priority(10);',
     Template => 'Blank',
     Stage => 'TransactionCreate',
 );
@@ -29,12 +29,12 @@
 
 my $priority_five_scrip = RT::Model::Scrip->new(current_user => RT->system_user);
 ($id, $msg) = $priority_ten_scrip->create( 
-    Description => "05 set priority $$",
+    description => "05 set priority $$",
     Queue => $queue_id, 
     ScripCondition => 'On Create',
     ScripAction => 'User Defined', 
     CustomPrepareCode => 'Jifty->log->debug("Setting priority to 5..."); return 1;',
-    CustomCommitCode => '$self->ticket_obj->set_Priority(5);', 
+    CustomCommitCode => '$self->ticket_obj->set_priority(5);', 
     Template => 'Blank',
     Stage => 'TransactionCreate',
 );
@@ -48,9 +48,9 @@
 );
 ok($ticket->id, "Created ticket? id=$id");
 
-isnt($ticket->Priority , 0, "Ticket shouldn't be priority 0");
-isnt($ticket->Priority , 5, "Ticket shouldn't be priority 5");
-is  ($ticket->Priority , 10, "Ticket should be priority 10");
+isnt($ticket->priority , 0, "Ticket shouldn't be priority 0");
+isnt($ticket->priority , 5, "Ticket shouldn't be priority 5");
+is  ($ticket->priority , 10, "Ticket should be priority 10");
 
 # }}}
 

Modified: rt/branches/3.999-DANGEROUS/t/api/template-insert.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/template-insert.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/template-insert.t	Tue Jan 29 12:16:03 2008
@@ -18,7 +18,7 @@
 isa_ok($template, 'RT::Model::Template');
 my ($val,$msg) = $template->create(Queue => 1,
                   name => 'InsertTest',
-                  Content => 'This is template content');
+                  content => 'This is template content');
 ok($val,$msg);
 is($template->name, 'InsertTest');
 is($template->content, 'This is template content', "We Created the object right");

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	Tue Jan 29 12:16:03 2008
@@ -117,15 +117,15 @@
 ok($jesse->id,  "Found the jesse rt user");
 
 
-ok ($ticket->is_watcher(Type => 'Requestor', principal_id => $jesse->principal_id), "The ticket actually has jesse at fsck.com as a requestor");
-ok (my ($add_id, $add_msg) = $ticket->add_watcher(Type => 'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok ($ticket->is_watcher(type => 'Requestor', principal_id => $jesse->principal_id), "The ticket actually has jesse at fsck.com as a requestor");
+ok (my ($add_id, $add_msg) = $ticket->add_watcher(type => 'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
 ok ($add_id, "Add succeeded: ($add_msg)");
 ok(my $bob = RT::Model::User->new(current_user => RT->system_user), "Creating a bob rt::user");
 $bob->load_by_email('bob at fsck.com');
 ok($bob->id,  "Found the bob rt user");
-ok ($ticket->is_watcher(Type => 'Requestor', principal_id => $bob->principal_id), "The ticket actually has bob at fsck.com as a requestor");;
-ok ( ($add_id, $add_msg) = $ticket->delete_watcher(Type =>'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
-ok (!$ticket->is_watcher(Type => 'Requestor', principal_id => $bob->principal_id), "The ticket no longer has bob at fsck.com as a requestor");;
+ok ($ticket->is_watcher(type => 'Requestor', principal_id => $bob->principal_id), "The ticket actually has bob at fsck.com as a requestor");;
+ok ( ($add_id, $add_msg) = $ticket->delete_watcher(type =>'Requestor', Email => 'bob at fsck.com'), "Added bob at fsck.com as a requestor");
+ok (!$ticket->is_watcher(type => 'Requestor', principal_id => $bob->principal_id), "The ticket no longer has bob at fsck.com as a requestor");;
 
 
 $group = RT::Model::Group->new(current_user => RT->system_user);

Modified: rt/branches/3.999-DANGEROUS/t/api/user.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/user.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/user.t	Tue Jan 29 12:16:03 2008
@@ -218,13 +218,13 @@
 ok($qv, "Granted the right successfully - $qm");
 
 # Add the user as a queue admincc
-ok (my ($add_id, $add_msg) = $q_as_system->add_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
+ok (my ($add_id, $add_msg) = $q_as_system->add_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
 ok ($add_id, "the user is now a queue admincc - $add_msg");
 
 # Make sure the user does have the right to modify tickets in the queue
 ok ($new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can modify the ticket as an admincc");
 # Remove the user from the role  group
-ok (my ($del_id, $del_msg) = $q_as_system->delete_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
+ok (my ($del_id, $del_msg) = $q_as_system->delete_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
 
 # Make sure the user doesn't have the right to modify tickets in the queue
 ok (!$new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
@@ -234,14 +234,14 @@
 # {{{ Test the user's right to modify a ticket as a _ticket_ admincc with the right granted at the _queue_ level
 
 # Add the user as a ticket admincc
-ok (my( $uadd_id, $uadd_msg) = $new_tick2->add_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
+ok (my( $uadd_id, $uadd_msg) = $new_tick2->add_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
 ok ($add_id, "the user is now a queue admincc - $add_msg");
 
 # Make sure the user does have the right to modify tickets in the queue
 ok ($new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can modify the ticket as an admincc");
 
 # Remove the user from the role  group
-ok (( $del_id, $del_msg) = $new_tick2->delete_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
+ok (( $del_id, $del_msg) = $new_tick2->delete_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
 
 # Make sure the user doesn't have the right to modify tickets in the queue
 ok (!$new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
@@ -270,14 +270,14 @@
 ok (!$new_user->has_right( Object => $new_tick2->queue_obj, Right => 'ModifyTicket'), "User can not modify tickets in the queue without being an admincc");
 
 # Add the user as a queue admincc
-ok (($add_id, $add_msg) = $q_as_system->add_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
+ok (($add_id, $add_msg) = $q_as_system->add_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
 ok ($add_id, "the user is now a queue admincc - $add_msg");
 
 # Make sure the user does have the right to modify tickets in the queue
 ok ($new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can modify the ticket as an admincc");
 ok ($new_user->has_right( Object => $new_tick2->queue_obj, Right => 'ModifyTicket'), "User can modify tickets in the queue as an admincc");
 # Remove the user from the role  group
-ok (($del_id, $del_msg) = $q_as_system->delete_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
+ok (($del_id, $del_msg) = $q_as_system->delete_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
 
 # Make sure the user doesn't have the right to modify tickets in the queue
 ok (!$new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without group membership");
@@ -292,7 +292,7 @@
 
 
 # Add the user as a ticket admincc
-ok ( ($uadd_id, $uadd_msg) = $new_tick2->add_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
+ok ( ($uadd_id, $uadd_msg) = $new_tick2->add_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Added the new user as a queue admincc");
 ok ($add_id, "the user is now a queue admincc - $add_msg");
 
 # Make sure the user does have the right to modify tickets in the queue
@@ -300,7 +300,7 @@
 ok (!$new_user->has_right( Object => $new_tick2->queue_obj, Right => 'ModifyTicket'), "User can not modify tickets in the queue obj being only a ticket admincc");
 
 # Remove the user from the role  group
-ok ( ($del_id, $del_msg) = $new_tick2->delete_watcher(Type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
+ok ( ($del_id, $del_msg) = $new_tick2->delete_watcher(type => 'AdminCc', principal_id => $new_user->principal_id)  , "Deleted the new user as a queue admincc");
 
 # Make sure the user doesn't have the right to modify tickets in the queue
 ok (!$new_user->has_right( Object => $new_tick2, Right => 'ModifyTicket'), "User can't modify the ticket without being an admincc");


More information about the Rt-commit mailing list