This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/reports/ticket/department.xml

37 lines
1.4 KiB
XML
Raw Normal View History

<report>
<title>Department Ticket Statistics</title>
<graph type="bar" title="" width="500" height="300">
<dataset>
<sql>SELECT B.name, count(A.id) as total from %%AGILE_DB_PREFIX%%ticket A join %%AGILE_DB_PREFIX%%ticket_department B on A.department_id=B.id</sql>
<criteria>A.site_id = %%DEFAULT_SITE%%</criteria>
<orderby>GROUP BY name ORDER BY total DESC</orderby>
</dataset>
</graph>
<break />
<level>
<sql>SELECT B.name, count(A.id) as total from %%AGILE_DB_PREFIX%%ticket A join %%AGILE_DB_PREFIX%%ticket_department B on A.department_id=B.id</sql>
<criteria>A.site_id = %%DEFAULT_SITE%%</criteria>
<orderby>GROUP BY name ORDER BY total DESC</orderby>
<indent>0</indent>
<column>
<display>Department</display>
<field>name</field>
<visible>true</visible>
<group_children_by>true</group_children_by>
<aggregate>true</aggregate>
</column>
<column>
<display>Tickets</display>
<field>total</field>
<total>true</total>
</column>
<graph type="line" title="" width="600" height="180">
<dataset>
<sql>SELECT from_unixtime(A.date_orig,"%Y-%u") as yearmonth, count(A.id) as total, B.name from %%AGILE_DB_PREFIX%%ticket A left join %%AGILE_DB_PREFIX%%ticket_department B on A.department_id=B.id</sql>
<criteria>A.site_id = %%DEFAULT_SITE%%</criteria>
<orderby>GROUP BY yearmonth ORDER BY yearmonth ASC</orderby>
</dataset>
</graph>
<break />
</level>
</report>