[Rt-commit] r5123 - in rtir/branches/1.9-EXPERIMENTAL: etc
ruz at bestpractical.com
ruz at bestpractical.com
Wed Apr 26 19:45:33 EDT 2006
Author: ruz
Date: Wed Apr 26 19:45:33 2006
New Revision: 5123
Modified:
rtir/branches/1.9-EXPERIMENTAL/ (props changed)
rtir/branches/1.9-EXPERIMENTAL/UPGRADING
rtir/branches/1.9-EXPERIMENTAL/etc/initialdata
Log:
r1387 at cubic-pc: cubic | 2006-04-27 03:12:45 +0400
* update content of the template according to the latest RT API
* update upgrading docs
Modified: rtir/branches/1.9-EXPERIMENTAL/UPGRADING
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/UPGRADING (original)
+++ rtir/branches/1.9-EXPERIMENTAL/UPGRADING Wed Apr 26 19:45:33 2006
@@ -22,15 +22,99 @@
--datadir etc/upgrade/<version>
+Follow instructions from previous "upgrading from" sections at
+the end of this document if they apply to your installation.
+Upgrading from RTIR 1.1.5
+-------------------------
-Upgrading from RTIR 1.13
-========================
+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 >>>>>>>>>>>>>>>
-NOTE: Follow instructions from previous "upgrading from" sections at
-the end of this document if they apply to your installation, then
-follow the instructions below.
+Upgrading from RTIR 1.1.3
+-------------------------
1) Delete the following Scrips (go to Configuration / Queues / <Queue
Name> / Scrips):
@@ -77,6 +161,12 @@
2) Run the etc/upgrade/upgrade.pl script.
+This script updates Due Dates on all incidents and set to the most
+recent due date of the children.
+
+NOTE that script use hardcoded path '/opt/rt3', if your RT server installed
+into different location you should change it.
+
Upgrading from RTIR 1.1.2:
--------------------------
Modified: rtir/branches/1.9-EXPERIMENTAL/etc/initialdata
==============================================================================
--- rtir/branches/1.9-EXPERIMENTAL/etc/initialdata (original)
+++ rtir/branches/1.9-EXPERIMENTAL/etc/initialdata Wed Apr 26 19:45:33 2006
@@ -583,31 +583,36 @@
Template => 'BlockRemoved' },
);
+# WARNING: If you change content of the templates, don't forget to
+# mention it in the UPGRADING file
+
@Templates = (
{ Queue => 'Blocks',
Name => 'Autoreply',
Description => 'Sent when a block is created',
Content => 'RT-Attach-Message: yes
-Subject: {$Ticket->Subject}
+Subject: { $Ticket->Subject }
-{$Transaction->Content()}
+{ $Transaction->Content }
-{
- my $output = "";
- my $CustomFields = $Ticket->QueueObj->CustomFields();
- $CustomFields->{"find_disabled_rows"} = 1;
- while (my $CustomField = $CustomFields->Next()) {
- my @mailfields = ("_RTIR_IP",
- "_RTIR_Netmask",
- "_RTIR_Port",
- "_RTIR_WhereBlocked");
- my $Values = $Ticket->CustomFieldValues($CustomField->Id);
- while (my $Value = $Values->Next()) {
- for my $field (@mailfields) {
- if ($CustomField->Name eq $field) {
- $output .= $CustomField->Name.": ".$Value->Content."\n";
- }
- }
+{ 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;
@@ -615,13 +620,13 @@
-------------------------------------------------------------------------
Please include the string:
- [{$rtname} #{$Ticket->id}]
+ [{ $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()}', },
+ { $Ticket->QueueObj->CorrespondAddress }', },
{ Queue => 'Blocks',
Name => 'BlockRemoved',
Description => 'Sent when a block is removed',
@@ -629,22 +634,23 @@
Block #{$Ticket->id} was removed.
-{
- my $output = "";
- my $CustomFields = $Ticket->QueueObj->CustomFields();
- $CustomFields->{"find_disabled_rows"} = 1;
- while (my $CustomField = $CustomFields->Next()) {
- my @mailfields = ("_RTIR_IP",
- "_RTIR_Netmask",
- "_RTIR_Port",
- "_RTIR_WhereBlocked");
- my $Values = $Ticket->CustomFieldValues($CustomField->Id);
- while (my $Value = $Values->Next()) {
- for my $field (@mailfields) {
- if ($CustomField->Name eq $field) {
- $output .= $CustomField->Name.": ".$Value->Content."\n";
- }
- }
+{ 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;
More information about the Rt-commit
mailing list