Statistics - Duration of a Ticket in one Queue
Moderator: crythias
Statistics - Duration of a Ticket in one Queue
Is there any way to calculate how long one ticket stays in one queue? Or more specifically, how long does one ticket remain without a response in one queue.
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Statistics - Duration of a Ticket in one Queue
Unless it has moved, it's NOW() - create date.pizzadood wrote:Is there any way to calculate how long one ticket stays in one queue
Depends. Usually escalation (queue or sla) is involved with regard to this. Do you need a report on specific statistics, or do you need what escalation provides?pizzadood wrote:how long does one ticket remain without a response in one queue
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
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
Re: Statistics - Duration of a Ticket in one Queue
Thank you for the response, Cryhtias. The report I'm trying to generate is independent from escalation, I think. To be more specific, I'm looking for a way to generate a report that shows how long tickets stay in one queue regardless if it was moved from another queue or if the ticket was originaly created there... I was thinking of creating an extra dynamic field that just records the time an article was created so it would show on the statistics page. Am I on the right track?
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Statistics - Duration of a Ticket in one Queue
I'd almost query that directly from ticket_history.
Here's a sample query to get you started:
Here's a sample query to get you started:
Code: Select all
SELECT ticket.tn, ticket.title, ticket_history.name, ticket_history_type.name, ticket_history.create_time
FROM `ticket`
LEFT JOIN ticket_history ON ticket_history.ticket_id = ticket.id
LEFT JOIN ticket_history_type ON ticket_history.history_type_id = ticket_history_type.id
WHERE ticket_history_type.name = "Move"
OR ticket_history_type.name = "NewTicket"
OR (
ticket_history_type.name = "StateUpdate"
AND (
ticket_history.name LIKE '%closed successful\%\%'
OR ticket_history.name LIKE '%closed unsuccessful\%\%'
)
)
ORDER BY ticket.tn
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
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
Re: Statistics - Duration of a Ticket in one Queue
Again, thank you Cryhtias for the sample query. Is there anyway to apply this to OTRS' statistics module? Or do I have to use an external reporting tool?