Statistics not working in V3.0.4

Moderator: crythias

Post Reply
jforrow
Znuny newbie
Posts: 26
Joined: 02 Sep 2010, 16:21
Znuny Version: 3.0.9

Statistics not working in V3.0.4

Post by jforrow »

UDATE : I carried out a duplicate upgrade and can confirm that this problem occurs once the upgrade to 3.0.1 happens.


Got a strange problem that's come to light since upgrading to V3.0.4.

Statistics that were working on my old V2.4.3 installation no longer return data.

The statistic appears to run, and output is generated, but it contains no data.

The following error appears in Syslog (i've truncated it to hide my customer ID's and it is a long list):

Module PDF/API2.pm not found!
Thu Jan 20 09:53:29 2011 error OTRS-CGI-10 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '((st.customer_id = 'AVFS') )) OR ((st.customer_id='someone@somewhere.com))OR ((st.' at line 1, SQL: 'SELECT DISTINCT count(*) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.queue_id IN (5) AND st.ticket_priority_id IN (5) AND (((st.customer_id = 'voicemail2email@somewhere.com)) )) AND st.create_time_unix <= 1295567999 AND st.create_time_unix >= 1262304000 LIMIT 100000000'

An example of a non-working stat is configured as follows (The empty results are shown in the attached jpeg):

Stat Details
Stat#:
10017
Title:
+Overview of all tickets created over a period of time per Queue & by Priority.
Object:
TicketAccumulation
Description:
Overview of all tickets created over a period of time per Queue & by
Priority

X-Axis: Priority
Y-Axis: Queue

Restrictions:
-created during ?
Format:
Sum rows:
Yes
Sum columns:
Yes
Cache:
No
Valid:
valid
Created:
02/12/2009 16:07:48
Created by:
Admin OTRS
Changed:
07/01/2011 10:24:25
Changed by:
Chris Laker
X-axis
Priority:
All Priorities selected

Value Series
Queue:
Tech Support

Restrictions
Create Time:

Between

01/01/2010

and 20/01/2011

(maximal period from 01/01/2010 00:00:00 to 20/01/2011 23:59:59)
CustomerID:
All Customer ID's selected.
You do not have the required permissions to view the files attached to this post.
Test : OTRS 3.1.12 with ITSM 3.1.7
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
jforrow
Znuny newbie
Posts: 26
Joined: 02 Sep 2010, 16:21
Znuny Version: 3.0.9

Re: Statistics not working in V3.0.4

Post by jforrow »

Update:

I've opened a bug report for this issue, but in the meantime, I've found that the error only happens when customer_id contains space characters.
Test : OTRS 3.1.12 with ITSM 3.1.7
Prod : OTRS 3.1.12 with ITSM 3.1.7
Both running on Centos 5.7 with Mysql Database
Post Reply