I need some help in the "stats reports" subject.
I've to allow every agent to export (or simply view in dashboard - it would be better though) some data about his/hers ticket hours by day.
I've already managed to build a query, with a dynamic field included, and it works fine! But a normal agent don't have access to that.
Code: Select all
select
DATE_FORMAT(d1.value_date, '%Y/%m/%d' ) Modified_Date,
DATE_FORMAT(ta .change_time, '%Y/%m/%d' ) Input_Date,
u.login ,
CONCAT ( u.first_name , ' ' , u .last_name ) name,
q.name queue_name ,
t.tn ticketnumber ,
d.value_text ,
t.title title ,
ta.time_unit,
ta .article_id,
d1. object_id,
d. object_id,
Week( ta .change_time ) week
from time_accounting ta
left join ticket t on t. id = ta .ticket_id
left join queue q on t. queue_id = q . id
left join article a on a. id =ta .article_id
left join users u on u. id = ta .change_by
left join dynamic_field_value d on d. object_id = t .id AND d .field_id = '4'
left join dynamic_field_value d1 on d1. object_id = ta .article_id AND d1.field_id = '17'
where ta . time_unit is not null
order by t . tn
So, how can I create a solution, so that a normal agent (without admin permissions) can see the same that the query above?
Is it possible to see and edit the query in a stats report?
Regrads,
Flávio Rocha.