[Rt-commit] r4878 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Wed Mar 29 16:53:53 EST 2006
Author: ruz
Date: Wed Mar 29 16:53:53 2006
New Revision: 4878
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
Log:
r2273 at cubic-pc: cubic | 2006-03-30 02:01:01 +0400
* allow to create scrips on multiple queues at once
Modified: rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/sbin/rt-setup-database.in Wed Mar 29 16:53:53 2006
@@ -624,12 +624,18 @@
for $item (@Scrips) {
my $new_entry = new RT::Scrip($CurrentUser);
- my ( $return, $msg ) = $new_entry->Create(%$item);
- if ($return) {
- print $return. ".";
- }
- else {
- print "(Error: $msg)\n";
+
+ my @queues = ref $item->{'Queue'} eq 'ARRAY'? @{ $item->{'Queue'} }: $item->{'Queue'} || 0;
+ push @queues, 0 unless @queues; # add global queue at least
+
+ foreach my $q ( @queues ) {
+ my ( $return, $msg ) = $new_entry->Create( %$item, Queue => $q );
+ if ($return) {
+ print $return. ".";
+ }
+ else {
+ print "(Error: $msg)\n";
+ }
}
}
print "done.\n";
More information about the Rt-commit
mailing list