agent option to select RT queue
[freeside.git] / FS / FS / Conf.pm
index 30aa1e7..5f2c3b3 100644 (file)
@@ -1472,8 +1472,16 @@ httemplate/docs/config.html
   {
     'key'         => 'ticket_system-default_queueid',
     'section'     => '',
-    'description' => 'Default queue number used when creating new customer tickets.',
-    'type'        => 'text',
+    'description' => 'Default queue used when creating new customer tickets.',
+    'type'        => 'select-sub',
+    'options_sub' => sub { eval "use FS::TicketSystem;";
+                           die $@ if $@;
+                           FS::TicketSystem->queues();
+                         },
+    'option_sub'  => sub { eval "use FS::TicketSystem;";
+                           die $@ if $@;
+                           FS::TicketSystem->queue(shift);
+                         },
   },
 
   {