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 this is super helpful, we needed a query like this! Is there a way to build in some date reporting? Ideally I’d like to see total solutions per person by day or week.
Hey @Jason_Schulke I have date ranges for for things like reporting the number of non-employee signups per quarter using date ranges like this:
WHERE u.created_at BETWEEN '2020-05-01' AND '2020-07-31'
I’m not sure if solved has a date, because honestly I haven’t needed it on this search, but it might be something you can leverage as a starting point.
Just checking if there’s been any update on this. We’d also love that feature, and want to incentivize community members to solve questions via a leaderboard, schwag etc.