
Hi, upon further investigation and querying the database, it seems to me that there statistics' result with dynamic fields are incorrect. I'm able to make a query that yields the same result of a simple stat for ticket closed last month. The following query yields the same total and therefore I believe it is correct (I also cross checked a few data): select case when t.queue_id = 4 then 'Misc' else 'EDP' end as Coda, case when d.value_text = 1 then 'Informazioni' when d.value_text = 2 then 'Pagamento' when d.value_text = 3 then 'Consegna Espresso' when d.value_text = 4 then 'Consegna Tecnica' when d.value_text = 5 then 'Reso' when d.value_text = 6 then 'Carta Fan' else d.value_text end as TipoRichiesta, count(t.id) as Ticket from ticket t join dynamic_field_value d on d.object_id = t.id where t.queue_id in (4, 5) -- MISC, EDP and t.ticket_state_id = 2 -- Closed Successful and d.field_id = 3 -- TicketType and t.change_time between '20150201' and '20150228' group by t.queue_id, TipoRichiesta Aside for the duplicated dynamic field value rows (which I now believe I understand) the stat result is totally inconsistent with the above. paolo mosconi Paolo Mosconi [ACTVALUE_LOGO firma email] ActValue Consulting and Solutions Via A. De Gasperi, 126 - 20017 RHO (Milano) - ITALY T +39 02 934642 27 M +39 335 8107163 Skype: pmosconi paolo.mosconi@actvalue.commailto:paolo.mosconi@actvalue.com www.actvalue.comhttp://www.actvalue.com/ www.my-ecommerce.ithttp://www.my-ecommerce.it www.virtualrecruiter.ithttp://www.virtualrecruiter.it www.wiffi.ithttp://www.wiffi.it/ From: Paolo Mosconi Sent: giovedì 5 marzo 2015 12:14 To: 'otrs@otrs.org' Subject: Dynamic fields in statistics Hi, I created a new stat to show number of tickets by a dynamic field (request type) on X axis and status on Y axis. One of the dynamic field values is repeated twice in the report, i.e. there are two columns, and I would like to know why ... It might not be related, but the repeated value is the default one. I'm using OTRS 4.0.1. Any idea? Thanks Paolo Mosconi [ACTVALUE_LOGO firma email] ActValue Consulting and Solutions Via A. De Gasperi, 126 - 20017 RHO (Milano) - ITALY T +39 02 934642 27 M +39 335 8107163 Skype: pmosconi paolo.mosconi@actvalue.commailto:paolo.mosconi@actvalue.com www.actvalue.comhttp://www.actvalue.com/ www.my-ecommerce.ithttp://www.my-ecommerce.it www.virtualrecruiter.ithttp://www.virtualrecruiter.it www.wiffi.ithttp://www.wiffi.it/