[Rt-commit] r19907 - in rtir/2.5/trunk: html/RTIR/Incident/Elements

ruz at bestpractical.com ruz at bestpractical.com
Thu Jun 4 18:35:14 EDT 2009


Author: ruz
Date: Thu Jun  4 18:35:14 2009
New Revision: 19907

Modified:
   rtir/2.5/trunk/TODO.switch_custom_fields_to_generic_RT_methods
   rtir/2.5/trunk/html/RTIR/Incident/Elements/Create

Log:
* git rid of calls to EditRTIRField on incident create, everything
  except constituency

Modified: rtir/2.5/trunk/TODO.switch_custom_fields_to_generic_RT_methods
==============================================================================
--- rtir/2.5/trunk/TODO.switch_custom_fields_to_generic_RT_methods	(original)
+++ rtir/2.5/trunk/TODO.switch_custom_fields_to_generic_RT_methods	Thu Jun  4 18:35:14 2009
@@ -20,8 +20,10 @@
 ** Blocks/Port/OnCreate: $ARGS{'Port-Value'} || RT->Config->Get('_RTIR_Port_default')
 ** Blocks/Where Blocked/OnCreate: $ARGS{'WhereBlocked-Value'} || RT->Config->Get('_RTIR_WhereBlocked_default')
 ** similar applies to 'Net Mask'
-
-** IP default on Create:
+** Incident/OnCreate:
+*** Description, Classification, Function: RT->Config->Get('_RTIR_Description_default'),
+*** Resolution: no default
+** IP default on Create for children:
 my $ip_default = $ARGS{'IP-Value'};
 if ( !$ip_default && $IncidentObj ) {
     $ip_default = join "\n", grep $_, map $_->Content,
@@ -29,6 +31,13 @@
 }
 $ip_default ||= RT->Config->Get('_RTIR_IP_default') || '';
 
+** IP for incidents:
+my $ip_default = $ARGS{'IP-Value'};
+if ( !$ip_default && $ChildObj ) {
+    $ip_default = join "\n", grep $_, map $_->Content,
+        @{ $ChildObj->CustomFieldValues( 'IP' )->ItemsArrayRef };
+}
+$ip_default ||= RT->Config->Get('_RTIR_IP_default') || '';
 
 
 Implemented changes:

Modified: rtir/2.5/trunk/html/RTIR/Incident/Elements/Create
==============================================================================
--- rtir/2.5/trunk/html/RTIR/Incident/Elements/Create	(original)
+++ rtir/2.5/trunk/html/RTIR/Incident/Elements/Create	Thu Jun  4 18:35:14 2009
@@ -28,15 +28,6 @@
 <input name="Subject" size="60" maxsize="100" value="<% $Subject %>" />
 </td></tr>
 
-<tr><td class="labeltop"><&|/l&>Description</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField,
-    QueueObj => $QueueObj,
-    Name     => 'Description',
-    Default  => scalar RT->Config->Get('_RTIR_Description_default'),
-    Cols     => 40,
-&></td></tr>
-
 <tr><td class="label"><&|/l&>Constituency</&>:</td>
 <td class="value">
 % if ( !$ChildObj || RT->Config->Get('_RTIR_Constituency_Propagation') eq 'no' ) {
@@ -61,49 +52,6 @@
 % }
 </td></tr>
 
-<tr><td class="label"><&|/l&>Function</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField, 
-    QueueObj => $QueueObj, 
-    Name     => 'Function',
-    Default  => scalar RT->Config->Get('_RTIR_Function_default'),
-    Rows     => 1,
-&></td></tr>
-
-<tr><td class="label"><&|/l&>Classification</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField, 
-    QueueObj => $QueueObj, 
-    Name     => 'Classification',
-    Default  => scalar RT->Config->Get('_RTIR_Classification_default'),
-    Rows     => 1,
-&></td></tr>
-
-<tr><td class="label"><&|/l&>Resolution</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField,
-    QueueObj => $QueueObj,
-    Name     => 'Resolution',
-    Rows     => 1,
-&></td></tr>
-
-<%PERL>
-my $ip_default = $ARGS{'IP-Value'};
-if ( !$ip_default && $ChildObj ) {
-    $ip_default = join "\n", grep $_, map $_->Content,
-        @{ $ChildObj->CustomFieldValues( 'IP' )->ItemsArrayRef };
-}
-$ip_default ||= RT->Config->Get('_RTIR_IP_default') || '';
-</%PERL>
-<tr><td class="label"><&|/l&>IP</&>:</td>
-<td class="value">
-<& /RTIR/Elements/EditRTIRField,
-    QueueObj => $QueueObj,
-    Name     => 'IP',
-    Cols     => 40, Rows => 5,
-    Default  => $ip_default,
-&></td></tr>
-
 <tr><td colspan="2">
 <& /Ticket/Elements/EditCustomFields,
     TicketObj => $TicketObj,


More information about the Rt-commit mailing list