summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-10-05 18:35:13 -0700
committerJonathan Prykop <jonathan@freeside.biz>2016-02-03 17:27:39 -0600
commit1a96b3b591e134a079987838f9ceb2aa0d03298c (patch)
tree037fc0ca26f37abc401b687e1ba868ab9920a9eb /rt
parent1aa51c61c1104dfac3648993db4af1aed0ae89d2 (diff)
ticket_system-appointment-queueid config, RT#34237
Diffstat (limited to 'rt')
-rw-r--r--rt/share/html/Elements/CalendarSlotSchedule6
-rw-r--r--rt/share/html/Search/Schedule.html9
2 files changed, 12 insertions, 3 deletions
diff --git a/rt/share/html/Elements/CalendarSlotSchedule b/rt/share/html/Elements/CalendarSlotSchedule
index 045d6e436..4a9b3bcc3 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 be5a140ef..c729ff068 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 ) );