[freeside-commits]
freeside/FS/FS Schema.pm, 1.3, 1.4 Conf.pm, 1.138,
1.139 agent.pm, 1.11, 1.12 TicketSystem.pm, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Sat Oct 15 04:29:55 PDT 2005
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv8761/FS/FS
Modified Files:
Schema.pm Conf.pm agent.pm TicketSystem.pm
Log Message:
agent option to select RT queue
Index: TicketSystem.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/TicketSystem.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TicketSystem.pm 6 Dec 2004 14:00:43 -0000 1.2
+++ TicketSystem.pm 15 Oct 2005 11:29:53 -0000 1.3
@@ -5,10 +5,10 @@
use FS::Conf;
use FS::UID;
-install_callback FS::UID sub {
+FS::UID->install_callback( sub {
$conf = new FS::Conf;
$system = $conf->config('ticket_system');
-};
+} );
sub AUTOLOAD {
my $self = shift;
Index: agent.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/agent.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- agent.pm 7 Aug 2005 00:40:02 -0000 1.11
+++ agent.pm 15 Oct 2005 11:29:53 -0000 1.12
@@ -2,12 +2,13 @@
use strict;
use vars qw( @ISA );
+#use Crypt::YAPassGen;
use FS::Record qw( dbh qsearch qsearchs );
use FS::cust_main;
use FS::cust_pkg;
use FS::agent_type;
use FS::reg_code;
-#use Crypt::YAPassGen;
+use FS::TicketSystem;
@ISA = qw( FS::Record );
@@ -167,6 +168,18 @@
$self->agent_type->pkgpart_hashref;
}
+=item ticketing_queue
+
+Returns the queue name corresponding with the id from the I<ticketing_queueid>
+field, or the empty string.
+
+=cut
+
+sub ticketing_queue {
+ my $self = shift;
+ FS::TicketSystem->queue($self->ticketing_queueid);
+};
+
=item num_prospect_cust_main
Returns the number of prospects (customers with no packages ever ordered) for
Index: Conf.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Conf.pm,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -d -r1.138 -r1.139
--- Conf.pm 7 Oct 2005 02:25:40 -0000 1.138
+++ Conf.pm 15 Oct 2005 11:29:53 -0000 1.139
@@ -1472,8 +1472,16 @@
{
'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);
+ },
},
{
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Schema.pm 7 Sep 2005 12:56:41 -0000 1.3
+++ Schema.pm 15 Oct 2005 11:29:53 -0000 1.4
@@ -247,6 +247,7 @@
'disabled', 'char', 'NULL', 1,
'username', 'varchar', 'NULL', $char_d,
'_password','varchar', 'NULL', $char_d,
+ 'ticketing_queueid', 'int', 'NULL', '',
],
'primary_key' => 'agentnum',
'unique' => [],
More information about the freeside-commits
mailing list