From 481c83ef6cde42acf9b9aacc8cb32a6bfe06fa88 Mon Sep 17 00:00:00 2001
From: Matt Kirman <matt@mattkirman.com>
Date: Tue, 30 Sep 2014 09:46:51 +0100
Subject: [PATCH] Dashboard statistics should use 'period' as the date limiter

The statistics module on the dashboard was using the incorrect query parameter
'stop'. This meant that the module was loading all tickets from the report start
date to the present day. This commit fixes this by using the 'period' parameter
instead.
---
 WHATSNEW.md             | 1 +
 scp/js/dashboard.inc.js | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/WHATSNEW.md b/WHATSNEW.md
index 3b3e4fdd5..d94067f3b 100644
--- a/WHATSNEW.md
+++ b/WHATSNEW.md
@@ -22,6 +22,7 @@ osTicket v1.8.6
   * Fix corruption of email mailbox if improperly encoded as ISO-8859-1
     without RFC 2047 charset hint (#1332)
   * Fix occasional MySQL Commands OOS error from ORM (#1334)
+  * Dashboard statistics should use 'period' as the date limiter (#1345)
 
 ### Performance and Security
   * Fix XSS vulnerability in email template management (#1162, #1163)
diff --git a/scp/js/dashboard.inc.js b/scp/js/dashboard.inc.js
index ba19235f1..f0187d90f 100644
--- a/scp/js/dashboard.inc.js
+++ b/scp/js/dashboard.inc.js
@@ -140,7 +140,7 @@
             method:     'GET',
             dataType:   'json',
             url:        'ajax.php/report/overview/table',
-            data:       {group: group, start: start, stop: stop},
+            data:       {group: group, start: start, period: stop},
             success:    function(json) {
                 var q = $('<table>').attr({'class':'table table-condensed table-striped'}),
                     h = $('<tr>').appendTo($('<thead>').appendTo(q)),
-- 
GitLab