Fix comments newsletter participant ids#7046
Merged
Conversation
Instead of iterating components twice in NewsletterRecipients#participant_ids one for participants and one for commentators
Leusev
commented
Jan 5, 2021
Contributor
Author
Leusev
left a comment
There was a problem hiding this comment.
Well done @tramuntanal , great work! 😄
Contributor
|
Hi @decidim/core this PR is ready for review |
Leusev
added a commit
to gencat/decidim
that referenced
this pull request
Jan 11, 2021
5 tasks
oriolgual
approved these changes
Jan 14, 2021
tramuntanal
added a commit
that referenced
this pull request
Jan 20, 2021
* Fix comments newsletter participant ids * Introduce Commentable.user_commentators_ids_in(resource) * More performant query for Order newsletter participants * Refactor, compute commentators in #newsletter_participant_ids(component) Instead of iterating components twice in NewsletterRecipients#participant_ids one for participants and one for commentators * Rubocopify * Rubocopify core module Co-authored-by: Oliver Valls <199462+tramuntanal@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
At present, the Decidim::Comments::Comment's method
newsletter_participant_idsisn't filtering correctly by sent space's param, so when recovering all Decidim::User's ids, instead doing it by participatory space it's doing it by all organization's spaces.decidim/decidim-comments/app/models/decidim/comments/comment.rb
Line 147 in 943ef58
This PR fix that to filter by method's space param received.
📌 Related Issues
Testing
Describe the best way to test or validate your PR.
📋 Checklist
🚨 Please review the guidelines for contributing to this repository.
docs/.📷 Screenshots
Please add screenshots of the changes you're proposing