[otrs-cvs] otrs/Kernel/System/Stats/Dynamic TicketList.pm, 1.27, 1.28

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/otrs/Kernel/System/Stats/Dynamic
In directory lancelot:/tmp/cvs-serv14482/Kernel/System/Stats/Dynamic

Modified Files:
	TicketList.pm 
Log Message:
Fixed a problem in dynamic stats historic if no tickets were found thx to Jens Bothe.

Author: jh

Index: TicketList.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/System/Stats/Dynamic/TicketList.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -2 -u -d -r1.27 -r1.28
--- TicketList.pm	11 Dec 2012 09:27:48 -0000	1.27
+++ TicketList.pm	14 Jan 2013 13:29:42 -0000	1.28
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/Stats/Dynamic/TicketList.pm - reporting via ticket lists
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -800,14 +800,17 @@
     # if we have to deal with history states
     if (
-        $Param{Restrictions}->{HistoricTimeRangeTimeNewerDate}
-        || $Param{Restrictions}->{HistoricTimeRangeTimeOlderDate}
-        || (
-            defined $Param{Restrictions}->{StateTypeIDsHistoric}
-            && ref $Param{Restrictions}->{StateTypeIDsHistoric} eq 'ARRAY'
-        )
-        || (
-            defined $Param{Restrictions}->{StateIDsHistoric}
-            && ref $Param{Restrictions}->{StateIDsHistoric} eq 'ARRAY'
+        (
+            $Param{Restrictions}->{HistoricTimeRangeTimeNewerDate}
+            || $Param{Restrictions}->{HistoricTimeRangeTimeOlderDate}
+            || (
+                defined $Param{Restrictions}->{StateTypeIDsHistoric}
+                && ref $Param{Restrictions}->{StateTypeIDsHistoric} eq 'ARRAY'
+            )
+            || (
+                defined $Param{Restrictions}->{StateIDsHistoric}
+                && ref $Param{Restrictions}->{StateIDsHistoric} eq 'ARRAY'
+            )
         )
+        && @TicketIDs
         )
     {
@@ -818,8 +821,8 @@
         # 27 is state update
         my $SQL = 'history_type_id IN (1,27) ORDER BY ticket_id ASC';
-        if (@TicketIDs) {
-            $SQL = 'ticket_id IN ('
-                . ( join ', ', @TicketIDs ) . ') AND ' . $SQL;
-        }
+
+        $SQL = 'ticket_id IN ('
+            . ( join ', ', @TicketIDs ) . ') AND ' . $SQL;
+
         my %StateIDs;
 
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.