[SOLVED] Report to differentiating open tickets mail/phone?

Moderator: crythias

Post Reply
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

[SOLVED] Report to differentiating open tickets mail/phone?

Post by amdkryn »

How to generate report differentiating open tickets via email and by phone?
Can be with a simple search or report. I activated the opening of tickets by email and want to know which option is being used more.

tks,
Last edited by amdkryn on 17 Jun 2014, 19:56, edited 3 times in total.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Report to differentiating open tickets via email or phon

Post by amdkryn »

Someone? Any suggestions on how to differentiate simple search or report?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Giulio Soleni
Znuny wizard
Posts: 392
Joined: 30 Dec 2010, 14:35
Znuny Version: 6.0.x and 5.0.x
Real Name: Giulio Soleni
Company: IKS srl

Re: Report to differentiating open tickets via email or phon

Post by Giulio Soleni »

Hi,
I do not think there is an out-of-the-box feature to distinguish tickets created by email from tickets created by the web console.
The shortest way imho is to define a dynamic fileld, let say tk_origin like a dropbox with two values 'email' and 'web' (default) and force via Postmaster Filter every incoming email to create a ticket with the tk_origin = 'email' attribute set. You may then take care to let your customers set the same attribute as 'web' (only condition allowed) when they create a tk from the web console, or else you simply may left everything as it already is ... therefore only tickets created via email will set the tk_origin attribute as 'email', while all other "ordinary" tickets will not set that attribute at all.

Maybe instead you may define a new state, let's say "new from email" of type "new" and again via Postmaster Filter set a filter that force all incoming email to create a ticket with the "new from email" state instead of the "new" state. However mind that dealing with custom states is always a little bit more difficult than using custom attribute... since you may easily incur in some possible errors or inconsistencies...

HTH
OTRS 6.0.x on CentOS 7.x with MariaDB 10.2.x database connected to an Active Directory for Agents and Customers.
ITSM and FAQ modules installed.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Report to differentiating open tickets via email or phon

Post by crythias »

WebRequestCustomer is ticket_history_type.id=29
PhoneCallCustomer is ticket_history_type.id=14

to find ticket_history_type ids:
SELECT id,name FROM ticket_history_type

select count(*), history_type_id from ticket_history where history_type_id in (14,29) group by history_type_id

add numbers as needed for additional breakdowns.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
swype
Znuny newbie
Posts: 28
Joined: 28 Jan 2013, 14:57
Znuny Version: 3.3.x
Real Name: Andreas

Re: Report to differentiating open tickets via email or phon

Post by swype »

integrate a prefiled dynamic-field, with "phone" in the phone-view and add a postmaster-filter which set the field to "mail".
Than you can use the Statistic-Engine.

cheers
swype

PS:
a dropdown would be the best, controlled by an ACL for the AgentTicketPhone.
Helpdesk: Guten Tag, wie kann ich Ihnen helfen?
Kunde: Hallo... ich kann nicht drucken.
Helpdesk: Klicken Sie bitte mal auf Start und...
Kunde: Fangen Sie jetzt bitte nicht mit diesem ganzen technischen Scheiß an. Ich bin nicht Bill Gates!
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Report to differentiating open tickets via email or phon

Post by amdkryn »

crythias wrote:WebRequestCustomer is ticket_history_type.id=29
PhoneCallCustomer is ticket_history_type.id=14

to find ticket_history_type ids:
SELECT id,name FROM ticket_history_type

select count(*), history_type_id from ticket_history where history_type_id in (14,29) group by history_type_id

add numbers as needed for additional breakdowns.
Thanks for the help. From the options provided, that already meets my need. Could you help me to add the ticket number on the result so I validate the ticket open for the web?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Report to differentiating open tickets mail/phone?

Post by crythias »

Code: Select all

SELECT ticket.tn, tht.name FROM `ticket_history` th left join ticket on ticket.id = th.ticket_id left join ticket_history_type tht on tht.id = th.history_type_id WHERE th.history_type_id in (14,29);
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Report to differentiating open tickets mail/phone?

Post by amdkryn »

crythias wrote:

Code: Select all

SELECT ticket.tn, tht.name FROM `ticket_history` th left join ticket on ticket.id = th.ticket_id left join ticket_history_type tht on tht.id = th.history_type_id WHERE th.history_type_id in (14,29);
I copied and pasted exactly this command but with the error below:

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 'LIMIT 10' at line 1, SQL: 'SELECT ticket.tn, tht.name FROM `ticket_history` th left join ticket on ticket.id = th.ticket_id left join ticket_history_type tht on tht.id = th.history_type_id WHERE th.history_type_id in (14,29); LIMIT 10'

Any ideas on what it could be?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Report to differentiating open tickets mail/phone?

Post by crythias »

amdkryn wrote: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 'LIMIT 10' at line 1
amdkryn wrote:in (14,29); LIMIT 10'
Yes, can you see it?
.

.

.

.
.
.
Options are: clear the limit and/or remove the semicolon
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
amdkryn
Znuny expert
Posts: 187
Joined: 02 Oct 2012, 02:52
Znuny Version: 5.0.27

Re: Report to differentiating open tickets mail/phone?

Post by amdkryn »

crythias wrote:
amdkryn wrote: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 'LIMIT 10' at line 1
amdkryn wrote:in (14,29); LIMIT 10'
Yes, can you see it?
.
.
Options are: clear the limit and/or remove the semicolon
I interpreted that this limit would not generate error was my lack of attention, I apologize.

Thanks for the help, will mark the topic as solved.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Post Reply