Skip to content

[Bugfix:Forum] Save chatroom in db on delete#11858

Merged
bmcutler merged 13 commits intomainfrom
save-chatroom-in-db
Jul 10, 2025
Merged

[Bugfix:Forum] Save chatroom in db on delete#11858
bmcutler merged 13 commits intomainfrom
save-chatroom-in-db

Conversation

@martig7
Copy link
Copy Markdown
Contributor

@martig7 martig7 commented Jul 7, 2025

Why is this Change Important & Necessary?

We want to see chatroom information in database so that professors can check chatrooms even after they're deleted. Before deleting a chatroom would delete it from db.

What is the New Behavior?

Now a chatroom is kept in db, but a parameter labeled is_deleted is switched from false to true, which prevents the chatroom from showing.

What steps should a reviewer take to reproduce or test the bug or new feature?

On main, create and delete a chat. Then, go to sql toolbox and query SELECT * FROM chatrooms. That chatroom should not exist in db anymore. Switch to this branch, and do the same. The chatroom should still show, but with a new column labelled "is_deleted" set to true instead of false.

Automated Testing & Documentation

Deleting chats will be tested once #11818 is merged

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 20.70%. Comparing base (6cc6c8b) to head (aba1ec3).
Report is 19 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #11858      +/-   ##
============================================
- Coverage     20.70%   20.70%   -0.01%     
- Complexity     9191     9194       +3     
============================================
  Files           265      265              
  Lines         35215    35220       +5     
  Branches        458      458              
============================================
  Hits           7292     7292              
- Misses        27469    27474       +5     
  Partials        454      454              
Flag Coverage Δ
autograder 21.34% <ø> (ø)
js 2.14% <ø> (ø)
migrator 100.00% <ø> (ø)
php 19.38% <0.00%> (-0.01%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 88.88% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@jeffrey-cordero jeffrey-cordero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. I recommend making an issue to add unit testing to the ChatroomController.php file, as this would add a bit more complexity to the feature. A future addition of viewing deleted chat rooms as an instructor would also be a good follow-up for this.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Jul 9, 2025
@bmcutler bmcutler merged commit fff7b79 into main Jul 10, 2025
24 checks passed
@bmcutler bmcutler deleted the save-chatroom-in-db branch July 10, 2025 03:01
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jul 10, 2025
williamschen23 pushed a commit that referenced this pull request Jul 18, 2025
### Why is this Change Important & Necessary?
We want to see chatroom information in database so that professors can
check chatrooms even after they're deleted. Before deleting a chatroom
would delete it from db.

### What is the New Behavior?
Now a chatroom is kept in db, but a parameter labeled is_deleted is
switched from false to true, which prevents the chatroom from showing.

### What steps should a reviewer take to reproduce or test the bug or
new feature?
On main, create and delete a chat. Then, go to sql toolbox and query
SELECT * FROM chatrooms. That chatroom should not exist in db anymore.
Switch to this branch, and do the same. The chatroom should still show,
but with a new column labelled "is_deleted" set to true instead of
false.

### Automated Testing & Documentation
Deleting chats will be tested once #11818 is merged

---------

Co-authored-by: Alex Lavallee <73203142+lavalleeale@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants