Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record report actions #2854

Merged
merged 10 commits into from
Aug 6, 2023
Merged

Record report actions #2854

merged 10 commits into from
Aug 6, 2023

Conversation

mouse-reeve
Copy link
Member

@mouse-reeve mouse-reeve commented May 16, 2023

This table will now track all actions taken on a report, like resolving it, re-opening it, suspending the reported user, et cetera, in addition to comments. When there are multiple admins, this change will make it easier to understand what actions have been taken by whom on a report.

Work:

  • update model
  • track resolve/re-open
  • track suspend/un-suspend
  • track block/approve link domains
  • track messaging reporter and reportee
  • track deleting statuses
  • display actions taken

Fixes #2505

This table will now track all actions taken on a report, like resolving
it, re-opening it, suspending the reported user, et cetera, in addition
to comments. When there are multiple admins, this change will make it
easier to understand what actions have been taken by whom on a report.
@mouse-reeve
Copy link
Member Author

On second thoughts, I think recording DMs sent would be unnecessarily convoluted. It might make more sense (another time) to have a different way to updating users about actions taken on reports. @bookwyrm-social/code-review could someone take a look at this?

@mouse-reeve mouse-reeve marked this pull request as ready for review May 30, 2023 18:40
@hughrun
Copy link
Contributor

hughrun commented May 30, 2023

I can take a look in a couple of days unless someone else gets to it first, which they are very welcome to do! I've not used the admin interface but is there any way to store free text notes against a report? If so, that should be stored, and could possibly be included in a message/email to the reporter when the report is resolved?

@mouse-reeve
Copy link
Member Author

You can write plain text notes in reports (that's been true prior to this PR). Right now there's just a link to DM the reporter which autofills with "update on your report:" or something, which is kinda janky :)

Here's what a report action log (in this case, on a link domain reported as spam) might look like:
Screen Shot 2023-05-30 at 1 49 42 PM

@mouse-reeve
Copy link
Member Author

Now that I'm looking at it, I wonder if the chronology should be reversed 🤔

@jaschaurbach
Copy link
Member

Now that I'm looking at it, I wonder if the chronology should be reversed 🤔

As the comment box is at the bottom it would be good to have the order reversed for reading consistency.

@mouse-reeve
Copy link
Member Author

Sorry for the long delay on a very small change! This is ready for review

Copy link
Contributor

@hughrun hughrun left a comment

Choose a reason for hiding this comment

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

This looks mostly good. There's a bug, and what I guess is an enhancement suggestion.

I also noticed another bug when testing this that is not caused by anything in your code (the javascript for reporting a user is a little buggy) - I'll log an Issue for that.

bookwyrm/templates/settings/reports/report.html Outdated Show resolved Hide resolved
bookwyrm/views/admin/reports.py Show resolved Hide resolved
bookwyrm/views/admin/reports.py Show resolved Hide resolved
@mouse-reeve mouse-reeve requested a review from hughrun July 16, 2023 13:54
@mouse-reeve
Copy link
Member Author

I'm working on the prettier complaints in #2903

@mouse-reeve
Copy link
Member Author

@hughrun This has been sitting for a bit and I think it's ready to go so I'm going to go ahead and merge. Thank you for the feedback on it!

@mouse-reeve mouse-reeve merged commit 15e82ec into main Aug 6, 2023
@mouse-reeve mouse-reeve deleted the report-actions branch August 6, 2023 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show history on reports
3 participants