AO3-5234 Moderate Works #3162

Merged
merged 7 commits into from Nov 17, 2017

Conversation

Projects
None yet
3 participants
Owner

elzj commented Nov 16, 2017

Issue

https://otwarchive.atlassian.net/browse/AO3-5234

Purpose

  • Adds spam work review page for admins
  • Adds admin setting to control whether spam works should automatically be hidden or not

Testing

See issue

elzj and others added some commits Nov 10, 2017

@@ -21,4 +23,24 @@ $j(document).ready(function(){
$j(ticky).prop("checked", false);
});
});
+ $j("#spam_all_select").click(function() {
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

@@ -21,4 +23,24 @@ $j(document).ready(function(){
$j(ticky).prop("checked", false);
});
});
+ $j("#spam_all_select").click(function() {
+ $j("#spam_works").find(":checkbox[name='spam[]']").each(function(index, ticky) {
@houndci-bot

houndci-bot Nov 16, 2017

Line is too long.
'$j' is not defined.

@@ -21,4 +23,24 @@ $j(document).ready(function(){
$j(ticky).prop("checked", false);
});
});
+ $j("#spam_all_select").click(function() {
+ $j("#spam_works").find(":checkbox[name='spam[]']").each(function(index, ticky) {
+ $j(ticky).prop("checked", true);
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ $j(ticky).prop("checked", true);
+ });
+ });
+ $j("#spam_all_deselect").click(function() {
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ });
+ });
+ $j("#spam_all_deselect").click(function() {
+ $j("#spam_works").find(":checkbox[name='spam[]']").each(function(index, ticky) {
@houndci-bot

houndci-bot Nov 16, 2017

Line is too long.
'$j' is not defined.

+ });
+ $j("#spam_all_deselect").click(function() {
+ $j("#spam_works").find(":checkbox[name='spam[]']").each(function(index, ticky) {
+ $j(ticky).prop("checked", false);
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ $j(ticky).prop("checked", false);
+ });
+ });
+ $j("#ham_all_select").click(function() {
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ });
+ });
+ $j("#ham_all_select").click(function() {
+ $j("#spam_works").find(":checkbox[name='ham[]']").each(function(index, ticky) {
@houndci-bot

houndci-bot Nov 16, 2017

Line is too long.
'$j' is not defined.

+ });
+ $j("#ham_all_select").click(function() {
+ $j("#spam_works").find(":checkbox[name='ham[]']").each(function(index, ticky) {
+ $j(ticky).prop("checked", true);
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ $j(ticky).prop("checked", true);
+ });
+ });
+ $j("#ham_all_deselect").click(function() {
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

+ });
+ });
+ $j("#ham_all_deselect").click(function() {
+ $j("#spam_works").find(":checkbox[name='ham[]']").each(function(index, ticky) {
@houndci-bot

houndci-bot Nov 16, 2017

Line is too long.
'$j' is not defined.

+ });
+ $j("#ham_all_deselect").click(function() {
+ $j("#spam_works").find(":checkbox[name='ham[]']").each(function(index, ticky) {
+ $j(ticky).prop("checked", false);
@houndci-bot

houndci-bot Nov 16, 2017

'$j' is not defined.

@@ -0,0 +1,22 @@
+require "spec_helper"
@houndci-bot

houndci-bot Nov 16, 2017

Missing magic comment # frozen_string_literal: true.

+
+ describe ".processed_bulk_ids" do
+ it "removes conflicting ids" do
+ params = { spam: [1,2,3], ham: [2,4,6] }
@houndci-bot

houndci-bot Nov 16, 2017

Space missing after comma.

+ it "removes conflicting ids" do
+ params = { spam: [1,2,3], ham: [2,4,6] }
+ results = ModeratedWork.processed_bulk_ids(params)
+ expect(results).to eq({ spam: [1,3], ham: [4,6] })
@houndci-bot

houndci-bot Nov 16, 2017

Redundant curly braces around a hash parameter.
Space missing after comma.

+ end
+ it "doesn't error when params are missing" do
+ results = ModeratedWork.processed_bulk_ids({})
+ expect(results).to eq({ spam: [], ham: [] })
@houndci-bot

houndci-bot Nov 16, 2017

Redundant curly braces around a hash parameter.

elzj added some commits Nov 16, 2017

AO3-5234: Send emails about hiding spam works and hide works on revie…
…w when it isn't happening automatically

sarken approved these changes Nov 17, 2017

All comments/questions covered in chat -- merging!

@sarken sarken merged commit 58528f4 into otwcode:master Nov 17, 2017

4 checks passed

Scrutinizer 2 new issues, 24 updated code elements
Details
codeclimate All good!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
hound 25 violations found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment