Browse Source

Small improvements.

Martin Edenhofer 9 years ago
parent
commit
9ba17cbeb4
2 changed files with 4 additions and 3 deletions
  1. 2 1
      lib/stats/ticket_escalation.rb
  2. 2 2
      lib/stats/ticket_in_process.rb

+ 2 - 1
lib/stats/ticket_escalation.rb

@@ -29,11 +29,12 @@ class Stats::TicketEscalation
       state = 'ok'
     elsif own_escalated > 5
       state = 'bad'
-    elsif own_escalated > 10
+    else
       state = 'superbad'
     end
 
     {
+      state: state,
       average: average,
       state: state,
       own: own_escalated,

+ 2 - 2
lib/stats/ticket_in_process.rb

@@ -26,7 +26,7 @@ class Stats::TicketInProcess
     state = 'supergood'
     average_in_percent = '-'
 
-    if count != 0 && total != 0
+    if total != 0
       in_process_precent = (count * 1000) / ((total * 1000) / 100)
       if in_process_precent > 80
         state = 'supergood'
@@ -36,7 +36,7 @@ class Stats::TicketInProcess
         state = 'ok'
       elsif in_process_precent > 20
         state = 'bad'
-      elsif in_process_precent > 5
+      else
         state = 'superbad'
       end
     end