[Rt-commit] r6541 - rt/branches/3.6-EXPERIMENTAL-LONDRES/sbin

clkao at bestpractical.com clkao at bestpractical.com
Tue Nov 28 08:38:48 EST 2006


Author: clkao
Date: Tue Nov 28 08:38:46 2006
New Revision: 6541

Modified:
   rt/branches/3.6-EXPERIMENTAL-LONDRES/sbin/rt-setup-database.in

Log:
Allow initdb to insert non-queue custom fields.  The logic for
looking up queue is in CustomField->Create already.


Modified: rt/branches/3.6-EXPERIMENTAL-LONDRES/sbin/rt-setup-database.in
==============================================================================
--- rt/branches/3.6-EXPERIMENTAL-LONDRES/sbin/rt-setup-database.in	(original)
+++ rt/branches/3.6-EXPERIMENTAL-LONDRES/sbin/rt-setup-database.in	Tue Nov 28 08:38:46 2006
@@ -544,20 +544,6 @@
             my $new_entry = new RT::CustomField($CurrentUser);
             my $values    = $item->{'Values'};
             delete $item->{'Values'};
-            my $q     = $item->{'Queue'};
-            my $q_obj = RT::Queue->new($CurrentUser);
-            $q_obj->Load($q);
-            if ( $q_obj->Id ) {
-                $item->{'Queue'} = $q_obj->Id;
-            }
-            elsif ( $q == 0 ) {
-                $item->{'Queue'} = 0;
-            }
-            else {
-                print "(Error: Could not find queue " . $q . ")\n"
-                  unless ( $q_obj->Id );
-                next;
-            }
             my ( $return, $msg ) = $new_entry->Create(%$item);
             unless( $return ) {
                 print "(Error: $msg)\n";


More information about the Rt-commit mailing list