SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001786SiT!pluginspublic2012-05-11 02:352012-07-06 08:42
Reporterpaulvh 
Assigned To 
PrioritylowSeveritytweakReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.65 LTS 
Target VersionFixed in Version 
Summary0001786: Add Sites report to the statistics plugin
DescriptionAdministrators asked for a way to see how many incidents are opened for each site.
Additional Information*** /var/sit-3.65/plugins/dashboard_statistics.php Sun Sep 4 12:51:16 2011
--- /var/www/plugins/dashboard_statistics.php Mon Mar 26 10:47:56 2012
***************
*** 64,75 ****
--- 64,94 ----
      if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_WARNING);
      $kbpublished=mysql_num_rows($result);
      mysql_free_result($result);
+
      echo "<a href='statistics.php'>{$GLOBALS['strIncidents']}</a>
";
      echo "{$todaysincidents} {$GLOBALS['strLogged']}</a>
";
      echo "{$todaysupdated} {$GLOBALS['strUpdated']}
";
      echo "{$todaysclosed} {$GLOBALS['strClosed']}
";
      echo "{$supportopen} {$GLOBALS['strCurrentlyOpen']}
";

+ // Count by sites
+ echo "
<a href='statistics.php'>By Site</a>
";
+ $sql = "SELECT COUNT(i.id) AS count, s.name AS name FROM `incidents` AS i, `maintenance` AS m, `sites` AS s WHERE s.id = m.site AND m.id = i.maintenanceid AND i.status != 2 GROUP BY s.id ORDER BY s.name";
+ // $sql = "SELECT DISTINCT s.id, s.name AS name FROM `maintenance` AS m, `sites` AS s WHERE s.id = m.site AND m.term <> 'yes' ORDER BY s.name";
+ $result = mysql_query($sql);
+ if (mysql_error()) trigger_error("MySQL Query Error ".mysql_error(), E_USER_WARNING);
+
+ if (mysql_num_rows($result) > 1)
+ {
+ $totalpersite = 0;
+ while ($rowGroup = mysql_fetch_object($result))
+ {
+ $totalpersite += $rowGroup->count;
+ echo "{$rowGroup->count} - {$rowGroup->name}
";
+ }
+ }
+ echo "{$totalpersite} - Total
\n";
+
      echo "
<a href='kb.php?mode=today'>";
      echo "{$GLOBALS['strKnowledgeBaseArticles']}</a>

";
      echo "{$kbpublished} {$GLOBALS['strPublishedToday']}</a>
";
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (0004488)
Tomse (developer)
2012-06-09 08:06

Hi paulvh: thanks for the report/feature

- Issue History
Date Modified Username Field Change
2012-05-11 02:35 paulvh New Issue
2012-06-09 08:06 Tomse Note Added: 0004488
2012-07-06 08:42 Tomse Status new => acknowledged


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker