Skip to content

Fix unhideable reported collaborative drafts and mail jobs#4706

Merged
mrcasals merged 12 commits intomasterfrom
Fix-email-collaborative-draft-reported
Jan 8, 2019
Merged

Fix unhideable reported collaborative drafts and mail jobs#4706
mrcasals merged 12 commits intomasterfrom
Fix-email-collaborative-draft-reported

Conversation

@aitorlb
Copy link
Copy Markdown
Contributor

@aitorlb aitorlb commented Dec 20, 2018

🎩 What? Why?

When a collaborative draft is reported the mail job fails.

Also, this PR fixes the following items that were found while investigating the original issue:

  • Reported collaborative drafts that have been hidden by the admin in the moderation manager still show in the public view (hidden proposals and comments work fine).
  • Trying to access a proposal/collaborative draft that has been hidden raises an ActiveRecord::RecordNotFound error.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry

📷 Screenshots (optional)

Collaborative draft report mail job

report_email

@ghost ghost assigned aitorlb Dec 20, 2018
@ghost ghost added the status: WIP label Dec 20, 2018
Copy link
Copy Markdown
Contributor

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

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

The changes should be at CollaborativeDraft class, not at Reportable

oriolgual
oriolgual previously approved these changes Dec 20, 2018
@aitorlb
Copy link
Copy Markdown
Contributor Author

aitorlb commented Dec 20, 2018

Thanks @oriolgual

@aitorlb
Copy link
Copy Markdown
Contributor Author

aitorlb commented Dec 21, 2018

Copy link
Copy Markdown
Contributor

@oriolgual oriolgual left a comment

Choose a reason for hiding this comment

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

Please, update the CHANGELOG and once it's merged could you backport it to 0.16?

Also, in the future it would be better to submit different PRs to solve each issue.

@aitorlb aitorlb changed the title Fix send email to admin Fix unhideable reported collaborative drafts and mail jobs Dec 26, 2018
@ghost ghost added the status: WIP label Dec 26, 2018
@aitorlb aitorlb mentioned this pull request Dec 26, 2018
2 tasks
@aitorlb
Copy link
Copy Markdown
Contributor Author

aitorlb commented Dec 26, 2018

@oriolgual , you're right. I've made a separate PR for the unrelated refactoring of the admin moderation manager.

mrcasals
mrcasals previously approved these changes Jan 4, 2019
mrcasals
mrcasals previously approved these changes Jan 4, 2019
@mrcasals
Copy link
Copy Markdown
Contributor

mrcasals commented Jan 7, 2019

Please bring this branch up to date so tests can correctly run! 😄

@ghost ghost added the status: WIP label Jan 7, 2019
@aitorlb
Copy link
Copy Markdown
Contributor Author

aitorlb commented Jan 7, 2019

Thanks @mrcasals

@ghost ghost assigned mrcasals Jan 8, 2019
@ghost ghost added the status: WIP label Jan 8, 2019
@mrcasals mrcasals merged commit 0701a8d into master Jan 8, 2019
@mrcasals mrcasals deleted the Fix-email-collaborative-draft-reported branch January 8, 2019 08:06
@ghost ghost removed the status: WIP label Jan 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collaborative Drafts fail when reported

3 participants