[freeside-commits] branch FREESIDE_4_BRANCH updated. 477630774d47395f9d42c74fb009eaa4a497e1ac
Ivan
ivan at 420.am
Mon Oct 5 18:35:16 PDT 2015
The branch, FREESIDE_4_BRANCH has been updated
via 477630774d47395f9d42c74fb009eaa4a497e1ac (commit)
from 23b0d9bf0da485662c257fda156cad40b99d9612 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 477630774d47395f9d42c74fb009eaa4a497e1ac
Author: Ivan Kohler <ivan at freeside.biz>
Date: Mon Oct 5 18:35:15 2015 -0700
ticket_system-appointment-queueid config, RT#34237
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 5c9026a..9558693 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -3189,12 +3189,14 @@ and customer address. Include units.',
}
},
},
+
{
'key' => 'ticket_system-force_default_queueid',
'section' => 'ticketing',
'description' => 'Disallow queue selection when creating new tickets from customer view.',
'type' => 'checkbox',
},
+
{
'key' => 'ticket_system-selfservice_queueid',
'section' => 'ticketing',
@@ -3273,6 +3275,34 @@ and customer address. Include units.',
},
{
+ 'key' => 'ticket_system-appointment-queueid',
+ 'section' => 'ticketing',
+ 'description' => 'Custom field from the ticketing system to use as an appointment classification.',
+ #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-escalation',
'section' => 'ticketing',
'description' => 'Enable priority escalation of tickets as part of daily batch processing.',
diff --git a/rt/share/html/Elements/CalendarSlotSchedule b/rt/share/html/Elements/CalendarSlotSchedule
index 045d6e4..4a9b3bc 100644
--- a/rt/share/html/Elements/CalendarSlotSchedule
+++ b/rt/share/html/Elements/CalendarSlotSchedule
@@ -87,7 +87,11 @@
% # (XXX and eventually, package)
% my $cust_main = qsearchs('cust_main', { custnum=>$custnum } )
% or die "unknown custnum $custnum";
-% my $Queue = $cust_main->agent->ticketing_queueid || 1; # || $default_queueid;#XXX really, pick pkg_category queue
+%
+% my $conf = new FS::Conf;
+% my $Queue = $conf->config('ticket_system-appointment-queueid')
+% or die "ticket_system-appointment-queueid configuration not set";
+%
% my $member = "freeside://freeside/cust_main/$custnum";
%
%warn my $Starts = int($tod_row/60). ':'. sprintf('%02d',$tod_row%60). ':00';
diff --git a/rt/share/html/Search/Schedule.html b/rt/share/html/Search/Schedule.html
index be5a140..c729ff0 100644
--- a/rt/share/html/Search/Schedule.html
+++ b/rt/share/html/Search/Schedule.html
@@ -201,8 +201,8 @@
<& /Search/Calendar.html,
@_,
Query => "( Status = 'new' OR Status = 'open' OR Status = 'stalled')
- AND ( Type = 'reminder' OR 'Type' = 'ticket' )",
- #XXX and we have the magic custom field
+ AND ( Type = 'reminder' OR 'Type' = 'ticket' )
+ AND Queue.id = $queueid ",
slots => scalar(@usernames),
Embed => 'Schedule.html',
DimPast => 1,
@@ -222,6 +222,11 @@ my $timestep = RT->Config->Get('CalendarWeeklySizeMin') || 30; #1/2h
</%ONCE>
<%init>
+#abstraction-leaking
+my $conf = new FS::Conf;
+my $queueid = $conf->config('ticket_system-appointment-queueid')
+ or die "ticket_system-appointment-queueid configuration not set";
+
my @files = ();
#if ( ! $initialized ) {
push @files, map "overlibmws$_", ( '', qw( _iframe _draggable _crossframe ) );
-----------------------------------------------------------------------
Summary of changes:
FS/FS/Conf.pm | 30 +++++++++++++++++++++++++++
rt/share/html/Elements/CalendarSlotSchedule | 6 +++++-
rt/share/html/Search/Schedule.html | 9 ++++++--
3 files changed, 42 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list