[Rt-commit] r6281 - in rtir/branches/2.1-EXPERIMENTAL: .

ruz at bestpractical.com ruz at bestpractical.com
Wed Oct 25 07:43:57 EDT 2006


Author: ruz
Date: Wed Oct 25 07:43:56 2006
New Revision: 6281

Modified:
   rtir/branches/2.1-EXPERIMENTAL/   (props changed)
   rtir/branches/2.1-EXPERIMENTAL/UPGRADING
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/content
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Informix
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Oracle
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Pg
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.SQLite
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Sybase
   rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.mysql

Log:
 r1688 at cubic-pc (orig r6150):  ruz | 2006-10-04 04:05:37 +0400
 * figure out upgrade of templates


Modified: rtir/branches/2.1-EXPERIMENTAL/UPGRADING
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/UPGRADING	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/UPGRADING	Wed Oct 25 07:43:56 2006
@@ -35,90 +35,19 @@
 Upgrading from RTIR 1.1.5
 -------------------------
 
-1) NewMessage template in Blocks and LaunchMessage in Investigations
-queues were renamed into 'Autoreply', but also content of
-the 'NewMessage' template was changed, new content is below. Update
-content of the template in Blocks queue manually.
-<<<<<<<<<<< start <<<<<<<<<<<<<<<
-RT-Attach-Message: yes
-Subject: { $Ticket->Subject }
-
-{ $Transaction->Content }
-
-{ my $output = "";
-  my @mailfields = qw(
-      _RTIR_IP
-      _RTIR_Netmask
-      _RTIR_Port
-      _RTIR_WhereBlocked
-  );
-
-  my $CustomFields = $Ticket->QueueObj->TicketCustomFields;
-  while ( my $CustomField = $CustomFields->Next ) {
-    my $name = $CustomField->Name;
-    next unless grep $_ eq $name, @mailfields;
-
-    my $Values = $Ticket->CustomFieldValues( $CustomField->Id );
-    while ( my $Value = $Values->Next ) {
-      $name =~ /^_RTIR_(.*)/;
-      $output .= ($1 || $name) .": "
-              .  $Value->Content ."\n";
-    }
-  }
-  return $output;
-}
--------------------------------------------------------------------------
-Please include the string:
-
-         [{ $rtname } #{ $Ticket->id }]
-
-in the subject line of all future correspondence about this issue. To do so, 
-you may reply to this message.
-
-                        Thank you,
-                        { $Ticket->QueueObj->CorrespondAddress }
->>>>>>>>>>>  end  >>>>>>>>>>>>>>>
-
-2) Content of the template 'BlockRemoved' was also changed:
-
-<<<<<<<<<< start <<<<<<<<<<<<<<<<
-Subject: {$Ticket->Subject}
-
-Block #{$Ticket->id} was removed.
-
-{ my $output = "";
-  my @mailfields = qw(
-    _RTIR_IP
-    _RTIR_Netmask
-    _RTIR_Port
-    _RTIR_WhereBlocked
-  );
-  my $CustomFields = $Ticket->QueueObj->TicketCustomFields;
-  while ( my $CustomField = $CustomFields->Next ) {
-    my $name = $CustomField->Name;
-    next unless grep $_ eq $name, @mailfields;
-
-    my $Values = $Ticket->CustomFieldValues( $CustomField->Id );
-    while ( my $Value = $Values->Next ) {
-      $name =~ /^_RTIR_(.*)/;
-      $output .= ($1 || $name) .": "
-              .  $Value->Content ."\n";
-    }
-  }
-  return $output;
-}
--------------------------------------------------------------------------
-Please include the string:
-
-         [{$rtname} #{$Ticket->id}]
-
-in the subject line of all future correspondence about this issue. To do so, 
-you may reply to this message.
-
-                        Thank you,
-                        {$Ticket->QueueObj->CorrespondAddress()}
->>>>>>>>>>>  end  >>>>>>>>>>>>>>>
+1) The LaunchMessage template in the Investigations queue
+has been renamed into Autoreply without any changes of the content.
+This upgrade step is automated, but may fail if you've changed
+the LaunchMessage template.
+
+2) In the Blocks queue an Autoreply template is adde. This is
+replacement the NewMessage template. Automated step doesn't delete
+old template, you have to check that the new template suites your
+needs and may be copy customizations from the old one, then delete
+the NewMessage template.
 
+3) A new template has been added - 'BlockRemoved' in the Blocks
+queue.
 
 Upgrading from RTIR 1.1.3
 -------------------------

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/content
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/content	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/content	Wed Oct 25 07:43:56 2006
@@ -291,6 +291,46 @@
 
 @Templates = (
     { Queue       => 'Blocks',
+      Name        => 'Autoreply',
+      Description => 'Sent when a block is created',
+      Content     => 'RT-Attach-Message: yes
+Subject: { $Ticket->Subject }
+
+{ $Transaction->Content }
+
+{ my $output = "";
+  my @mailfields = qw(
+      _RTIR_IP
+      _RTIR_Netmask
+      _RTIR_Port
+      _RTIR_WhereBlocked
+  );
+
+  my $CustomFields = $Ticket->QueueObj->TicketCustomFields;
+  while ( my $CustomField = $CustomFields->Next ) {
+    my $name = $CustomField->Name;
+    next unless grep $_ eq $name, @mailfields;
+
+    my $Values = $Ticket->CustomFieldValues( $CustomField->Id );
+    while ( my $Value = $Values->Next ) {
+      $name =~ /^_RTIR_(.*)/;
+      $output .= ($1 || $name) .": "
+              .  $Value->Content ."\n";
+    }
+  }
+  return $output;
+}
+-------------------------------------------------------------------------
+Please include the string:
+
+         [{ $rtname } #{ $Ticket->id }]
+
+in the subject line of all future correspondence about this issue. To do so, 
+you may reply to this message.
+
+                        Thank you,
+                        { $Ticket->QueueObj->CorrespondAddress }', },
+    { Queue       => 'Blocks',
       Name        => 'BlockRemoved',
       Description => 'Sent when a block is removed',
       Content     => 'Subject: {$Ticket->Subject}

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Informix
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Informix	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Informix	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Oracle
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Oracle	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Oracle	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Pg
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Pg	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Pg	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.SQLite
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.SQLite	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.SQLite	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Sybase
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Sybase	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.Sybase	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');

Modified: rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.mysql
==============================================================================
--- rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.mysql	(original)
+++ rtir/branches/2.1-EXPERIMENTAL/etc/upgrade/1.9.0/schema.mysql	Wed Oct 25 07:43:56 2006
@@ -1,3 +1,2 @@
 UPDATE CustomFields SET Disabled = 0 WHERE Name LIKE '_RTIR_%';
-UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'NewMessage' AND Description LIKE 'Sent when a block is created')
-    OR (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');
+UPDATE Templates SET Name = 'Autoreply' WHERE (Name LIKE 'LaunchMessage' AND Description LIKE 'Sent when an investigation is launched');


More information about the Rt-commit mailing list