[Rt-commit] r6151 - in rtir/branches/2.0-TESTING: etc/upgrade/1.9.0
ruz at bestpractical.com
ruz at bestpractical.com
Tue Oct 3 21:03:43 EDT 2006
Author: ruz
Date: Tue Oct 3 21:03:43 2006
New Revision: 6151
Modified:
rtir/branches/2.0-TESTING/UPGRADING
rtir/branches/2.0-TESTING/etc/upgrade/1.9.0/content
Log:
* autoreply scrips apgrade
Modified: rtir/branches/2.0-TESTING/UPGRADING
==============================================================================
--- rtir/branches/2.0-TESTING/UPGRADING (original)
+++ rtir/branches/2.0-TESTING/UPGRADING Tue Oct 3 21:03:43 2006
@@ -40,7 +40,12 @@
the NewMessage template.
3) A new template has been added - 'BlockRemoved' in the Blocks
-queue.
+queue. Check its content.
+
+4) NotifyOnLaunch and NotifyOnCreate scrips have been deleted in
+the Implementations and the Blocks queues respectively. You have to
+use the default RT's Autoreply scrip instead or create autoreply
+scrips in these queues.
Upgrading from RTIR 1.1.3
-------------------------
Modified: rtir/branches/2.0-TESTING/etc/upgrade/1.9.0/content
==============================================================================
--- rtir/branches/2.0-TESTING/etc/upgrade/1.9.0/content (original)
+++ rtir/branches/2.0-TESTING/etc/upgrade/1.9.0/content Tue Oct 3 21:03:43 2006
@@ -1,8 +1,49 @@
+sub get_queue {
+ my $meta = shift;
+ my $obj = RT::Queue->new( $RT::SystemUser );
+ $obj->LoadByCols( ref $meta? %$meta: ( Name => $meta ) );
+ unless( $obj->id ) {
+ print STDERR "Couldn't load queue.";
+ return;
+ }
+ return $obj;
+
+}
+sub get_scrip {
+ my $meta = shift;
+ $meta = { Description => $meta } unless ref $meta;
+
+ if ( $meta->{'Queue'} && $meta->{'Queue'} !~ /^\d+$/ ) {
+ my $queue = get_queue( $meta->{'Queue'} ) or return;
+ $meta->{'Queue'} = $queue->id;
+ }
+
+ my $obj = RT::Scrip->new( $RT::SystemUser );
+ $obj->LoadByCols( %$meta );
+ unless( $obj->id ) {
+ print STDERR "Couldn't load scrip.";
+ return;
+ }
+ return $obj;
+}
+
+sub delete_scrip {
+ my $obj = get_scrip( @_ ) or return;
+ # Delete has no return value
+ my ($status, $msg) = $obj->Delete;
+ print "Deleted scrip #". $obj->id .": ". $obj->Description ."\n";
+}
+
@Initial = ( sub {
eval { require RT::FM; };
if ($@) {
die "RTIR is built on top of RTFM; please install RTFM before continuing.\n";
}
+}, sub {
+ delete_scrip( { Description => 'NotifyOnLaunch', Queue => 'Investigations' } );
+ delete_scrip( { Description => 'NotifyOnCreate', Queue => 'Blocks' } );
+
+
} );
@CustomFields = (
More information about the Rt-commit
mailing list