[Bugfix:Forum] Show deleted post stats#12711
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes forum statistics aggregation so users with only deleted forum posts are included on /forum/stats, aligning the displayed “Total Deleted Posts” column with the set of users shown.
Changes:
- Added a shared helper to initialize forum stats user entries with consistent default fields.
- Added an aggregated query to compute deleted post counts per user (instead of per-user queries).
- Seeded the stats user list from deleted-post activity in addition to visible posts and upducks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12711 +/- ##
============================================
+ Coverage 21.64% 21.75% +0.10%
- Complexity 9654 9658 +4
============================================
Files 268 268
Lines 36245 36261 +16
Branches 487 487
============================================
+ Hits 7846 7888 +42
+ Misses 27916 27890 -26
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dagemcn
left a comment
There was a problem hiding this comment.
Functionality looks good. I scanned the code and it looks good as well. Good work here.
Farhanxikram
left a comment
There was a problem hiding this comment.
Hey, I did a functionality test on this, and everything seemed good. Everything is working as specified, and it didn't break anything as far as I could tell :)
Os: Windows
Browser: Chrome
Why is this Change Important & Necessary?
Fixes #12706
Users with only deleted forum posts do not appear on
/forum/stats.Currently, the stats page builds its user list from visible posts and upducks only. As a result, users with only deleted posts are never added to the stats data, even though deleted post counts are displayed in the table.
What is the New Behavior?
Users with deleted-post-only activity are now included in forum stats.
The controller now:
As a result, users with only deleted posts now appear on
/forum/statswith:Screenshots:
What steps should a reviewer take to reproduce or test the bug or new feature?
/forum/statsBefore this change:
After this change:
Additional checks:
Automated Testing & Documentation
This change was manually tested on the forum stats page.
No automated tests were added. A follow-up issue can be opened for test coverage of forum stats edge cases if needed.
No submitty.org documentation changes are required, as this fixes existing behavior.
Other information