[User Story] As a spam admin I want to mark revisions as spam/ham more easily, so I can be more efficient



3 years ago
3 years ago


(Reporter: atopal, Unassigned)


(Blocks: 1 bug, {in-triage})


User Story

I as a spam admin want to mark revisions as spam/ham more easily, so I can be more efficient


3 years ago
Currently marking revisions as spam/ham on the revision dashboard requires 2 clicks to submit and navigating back to the revision dashboard and looses the position on the revision dashboard, making it rather time consuming to mark several items in quick succession.

I'd like to be able to mark an item as ham/spam and quickly move on to the next item.

My proposal: perform action without leaving the page. If possible, update status in place.


3 years ago
Component: Knowledge Base Software → General
Product: support.mozilla.org → Mozilla Developer Network
Severity: normal → enhancement
Keywords: in-triage

Comment 1

3 years ago
Including a link to the dashboard for reference:
Summary: [User Story] I as a spam admin want to mark revisions as spam/ham more easily, so I can be more efficient → [User Story] As a spam admin I want to mark revisions as spam/ham more easily, so I can be more efficient
Details from our Friday conversation:

* Spam/Ham button are not visible unless you are superuser. This should be changed to the "Can add Akismet submission" permission.
* There is also a waffle flag "spam_submissions_enabled" to make the button visible. This will eventually be removed, and only Django permissions used. The existing waffle flag logic can be retained or removed, whatever makes feature easier to implement.
* Spam/Ham buttons currently open the Django admin to create a record. If possible, this should be changed to a standard Django view, checking the "Can add Akismet submission" permission, so that the Django Admin is not required. Again, up to the developer to include this work or to continue using the Django Admin.
* One-click access implies an AJAX call to create the submission, and in-page updating to show the new state.  Javascript can be assumed.  It must return an error if the user doesn't have the required permissions. If a user-visible HTML form is also provided, it must respond to GET as well as POST.

Comment 3

3 years ago
Should this bugfix include a fix for the "Resubmit" button as well?
The Resubmit button can continue being a link to the Django admin for this round.
Commits pushed to master at https://github.com/mozilla/kuma

bug 1268642 - spam/ham buttons call new view that submits akismet automatically. View checks akismet permissions. Possible TODO - make this an ajax call, add a message back to the user for error and success.

bug 1268642 - Add a model method to check Akismet permissions for user/group. Refactor this for akismet submit view. Check this method in the dashboard view for show_spam_submission flag.

bug 1268642 - check for Akisment permission with exists(). Check for authentication before spam/ham permission check. Update tests for authenticated users and spam button existence.

bug 1268642 - Use the @permission_r
equired decorator on the spam/ham submit view, remove the authentication check, use the
 has_perm method in the dash view for button display. Remove unneeded model method for
permissions. Update test to use testuser account with permission and add a test without
 this permission. Pep8 fixes.

bug 1268642 - test url redirection with the next variable with encoded url variable.

bug 1268642 - Add a test for no next URL variable present. Get replace filter for RevisionAkismetSubmission in tests.

bug 1268642 - Try/except around getting the revision for the akisment submission. Add a test for a nonexistent revision that tests the except case.

Merge pull request #3863 from caktus/new-issue-1268642-mark-spam-one-click

bug 1268642 - mark spam/ham with one click (Akismet submission)
Change is live in production, appears to be working. Leaving open for a while for some possible additions (Form-based validation, AJAX method)
The change does not include submitting the missed spam to Akismet, which was done in the form clean logic in the admin version. More commits coming.
Commits pushed to master at https://github.com/mozilla/kuma

bug 1268642 - Move submit_akismet_spam tests

Move tests for submit_akismet_spam view into their own class, in
preparation for adding tests for Akismet interaction

bug 1268642 - submit_akismet_spam uses a form

* Create RevisionAkismetSubmissionSpamForm, sharing functionality with
  RevisionAkismetSubmissionAdminForm via a new base class
* Drop the unused clean_sender method from the Admin form
* Use the new form in the submit_akismet_spam view

bug 1268642 - Verify that Akismet is called

Verify that, when enabled, Akismet's submit endpoints are called.

Merge pull request #3874 from mozilla/submit_spam_1268642

bug 1268642 - Submit spam to Akismet when spam is clicked on the dashboard
Latest version pushed to production.
QA Contact: kb-software
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.