- 'key' => 'ticket_system-escalation',
- 'section' => 'ticketing',
- 'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
- 'type' => 'checkbox',
- },
-
- {
- 'key' => 'ticket_system-rt_external_datasrc',
- 'section' => 'ticketing',
- 'description' => 'With external RT integration, the DBI data source for the external RT installation, for example, <code>DBI:Pg:user=rt_user;password=rt_word;host=rt.example.com;dbname=rt</code>',
- 'type' => 'text',
-
- },
-
- {
- 'key' => 'ticket_system-rt_external_url',
- 'section' => 'ticketing',
- 'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
- 'type' => 'text',
- },
-
- {
- 'key' => 'company_name',
- 'section' => 'required',
+ 'key' => 'ticket_system-appointment-queueid',
+ 'section' => 'appointments',
+ 'description' => 'Ticketing queue to use for appointments.',
+ #false laziness w/above
+ 'type' => 'select-sub',
+ 'options_sub' => sub {
+ my $conf = new FS::Conf;
+ if ( $conf->config('ticket_system') ) {
+ eval "use FS::TicketSystem;";
+ die $@ if $@;
+ FS::TicketSystem->queues();
+ } else {
+ ();
+ }
+ },
+ 'option_sub' => sub {
+ my $conf = new FS::Conf;
+ if ( $conf->config('ticket_system') ) {
+ eval "use FS::TicketSystem;";
+ die $@ if $@;
+ FS::TicketSystem->queue(shift);
+ } else {
+ '';
+ }
+ },
+ },
+
+ {
+ 'key' => 'ticket_system-appointment-custom_field',
+ 'section' => 'appointments',
+ 'description' => 'Ticketing custom field to use as an appointment classification.',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'ticket_system-escalation',
+ 'section' => 'ticketing',
+ 'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
+ 'type' => 'checkbox',
+ },
+
+ {
+ 'key' => 'ticket_system-rt_external_datasrc',
+ 'section' => 'ticketing',
+ 'description' => 'With external RT integration, the DBI data source for the external RT installation, for example, <code>DBI:Pg:user=rt_user;password=rt_word;host=rt.example.com;dbname=rt</code>',
+ 'type' => 'text',
+
+ },
+
+ {
+ 'key' => 'ticket_system-rt_external_url',
+ 'section' => 'ticketing',
+ 'description' => 'With external RT integration, the URL for the external RT installation, for example, <code>https://rt.example.com/rt</code>',
+ 'type' => 'text',
+ },
+
+ {
+ 'key' => 'company_name',
+ 'section' => 'important',