As I get ready to open up my community to our partners and customers, we’re looking at using the user summary table (example.com/users) to help monitor what our SE community is doing.
One of the things I noticed is that while it counts likes, posts, visits, etc., it doesn’t show a count of how many items the user posted that were then marked solved. This could be very valuable for our managers to see who’s contributing and also solving issues.
I couldn’t find anything in the admin console to enable this, so it may be a feature request. I’m also on a hosted solution if that makes any difference, but I didn’t see anything in the plugin settings.
That’s why I’m asking, Discourse does a really good job of summarizing data, but this one is missing and would be really useful. This is the summary I’m talking about.
Understand it’s a feature request which is what I figured. It would certainly make it more useful for tracking what users are up to if I want to make participation in the community something I can track and report on for leadership.
Would there be a way to run it as a report instead with basically the same info? This is probably at best something I need to provide quarterly in my case, others may have different requirements.
Following up, I can get the data when there is a solution selected using the following:
SELECT value
FROM
post_custom_fields
WHERE
name = 'is_accepted_answer'
What I’m getting back is either ‘true’ which I expect from looking through the plugin code. There is one NULL, I am going to assume that this is from someone who checked a solution box then unchecked it. Unfortunately I can’t seem to get it to show other users who have 0 solved solutions when I try to build out the dashboard like you see at meta.discourse.com/users.
It’s possible it’s just my rusty SQL skills and maybe I’m missing something obvious in how to display the rest of my user base with 0 matches. I tried matching on NULL (1 match) and an empty string but that didn’t provide any additional output.
I can certainly run it today as there are only 7 of us with solved solutions as most of my users interact via email, but as we get ready to open this up to our user and partner base I’m guessing that will go up. If anyone has any pointers I’d appreciate it.
Here is the solution I have. I am filtering by group ID as that’s my employee group that I have everyone added to when they sign up:
SELECT u.username,
u.name,
us.likes_given,
us.likes_received,
us.topic_reply_count,
us.post_count,
us.posts_read_count,
us.topic_count,
COUNT(pc.name) AS solved
FROM
users u
JOIN
posts p ON p.user_id = u.id
LEFT JOIN
post_custom_fields pc ON pc.post_id = p.id
JOIN
user_stats us ON us.user_id = u.id
WHERE u.primary_group_id = [GROUP ID]
AND pc.name = 'is_accepted_answer'
GROUP BY u.id,
us.likes_given,
us.likes_received,
us.topic_reply_count,
us.post_count,
us.posts_read_count,
us.topic_count
@awlogan esto es súper útil, ¡necesitábamos una consulta como esta! ¿Hay alguna forma de incluir un informe por fecha? Idealmente, me gustaría ver el total de soluciones por persona por día o por semana.
Hola @Jason_Schulke, tengo rangos de fechas para cosas como informar el número de inscripciones de no empleados por trimestre, usando rangos de fechas como este:
WHERE u.created_at BETWEEN '2020-05-01' AND '2020-07-31'
No estoy seguro de si ‘solved’ tiene una fecha, porque honestamente no la he necesitado en esta búsqueda, pero podría ser algo que puedas aprovechar como punto de partida.
Solo quería saber si ha habido alguna actualización al respecto. También nos encantaría esa función y queremos incentivar a los miembros de la comunidad a resolver preguntas a través de una tabla de clasificación, artículos promocionales, etc.