Wondering if anyone knows a way (API or regular UI) to get a report of tickets where the Assignee was changed midway. I can click each individual ticket and look at the event history with Ctrl+F but… looking for something a little more efficient!
Check the Notification Center > “Ticket - A ticket has been assigned to me”
I don’t think you understood what I was looking for.
I want to generate a report of all tickets where the Assignee (internal field: “user_id”) was changed.
Example screenshot of the event I am trying to capture:
You are right I misread what you wrote. Apologies for that.
I don’t think there is going to be a report for that. You could theoretically do it through the API but you’d have to store the current user ID on tickets and then basically poll for changes on a regular basis. Probably not super feasible.
Out of curiosity, what are you looking to review with the data?
I am trying to generate a kind of efficiency report to review the tickets where the original assignee was not able to complete the ticket for whatever reason.
This would be useful metric. I looked at the API but there does not seem to be any way to even get to these “events”.
Got it, thanks for the extra details.
Yeah you wouldn’t see that event in the API, you’d need to basically keep a record of all tickets and current assignee, then poll like once a day on all tickets resolved on that day and compare the assignee. It’s not really going to be worth the effort in my opinion because it’s a ton of work.
Well yeah that would be a ton of work to do manually, but should be like 10 min of work for the database guy to add a report.
I assume (hope?) that there’s a specific event ID associated with the different audit log entries (let’s say
17 == an assignee change for this example), it would be something like:
SELECT ticket_id,title,event_desc,e.id as event_id FROM events AS e INNER JOIN tickets AS t ON ticket_id = t.id WHERE e.type = 17 ORDER BY ticket_id ASC,event_id DESC
I threw together a dummy database with random ticket titles and events, and got this nice result which is basically exactly what I wanted. Of course, this is dummy data… if I could somehow get a dump of the actual ticket data this would be pretty easy to produce.