projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lock table for tax district updates, #73185
[freeside.git]
/
FS
/
FS
/
part_export
/
rt_ticket.pm
diff --git
a/FS/FS/part_export/rt_ticket.pm
b/FS/FS/part_export/rt_ticket.pm
index
13a0367
..
80254fc
100644
(file)
--- a/
FS/FS/part_export/rt_ticket.pm
+++ b/
FS/FS/part_export/rt_ticket.pm
@@
-21,7
+21,7
@@
my %template_select = (
%templates = (0 => '',
map { $_->msgnum, $_->msgname }
qsearch({ table => 'msg_template',
%templates = (0 => '',
map { $_->msgnum, $_->msgname }
qsearch({ table => 'msg_template',
- hashref => {},
+ hashref => {
disabled => ''
},
order_by => 'ORDER BY msgnum ASC'
})
);
order_by => 'ORDER BY msgnum ASC'
})
);
@@
-36,6
+36,7
@@
my %queue_select = (
$queues{$_[0]};
},
option_values => sub {
$queues{$_[0]};
},
option_values => sub {
+ return (0) unless FS::Conf->new->config('ticket_system');
%queues = (0 => '', FS::TicketSystem->queues());
sort {$queues{$a} cmp $queues{$b}} keys %queues;
},
%queues = (0 => '', FS::TicketSystem->queues());
sort {$queues{$a} cmp $queues{$b}} keys %queues;
},
@@
-122,19
+123,25
@@
tie my %options, 'Tie::IxHash', (
);
%info = (
);
%info = (
- 'svc' => [qw( svc_acct
)], #others?
+ 'svc' => [qw( svc_acct
svc_broadband svc_phone svc_domain )],
'desc' =>
'desc' =>
-
'Create an RT ticket',
+ 'Create an RT ticket',
'options' => \%options,
'nodomain' => '',
'options' => \%options,
'nodomain' => '',
- 'no
tes' => <<'END'
-Create a ticket in RT. The subject and body of the ticket
-will be generated from a message template.
-END
+ 'no
_machine' => 1,
+ 'notes' => '
+ Create a ticket in RT. The subject and body of the ticket
+ will be generated from a message template.'
);
sub _export_ticket {
my( $self, $action, $svc ) = (shift, shift, shift);
);
sub _export_ticket {
my( $self, $action, $svc ) = (shift, shift, shift);
+ my $conf = new FS::Conf;
+ die "rt_ticket export - no ticket system configured"
+ unless $conf->config('ticket_system');
+
+ FS::TicketSystem->init();
+
my $msgnum = $self->option($action.'_template');
return if !$msgnum;
my $msgnum = $self->option($action.'_template');
return if !$msgnum;