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

Issue 106 #217

Merged
merged 13 commits into from
Sep 26, 2020
Merged

Issue 106 #217

merged 13 commits into from
Sep 26, 2020

Conversation

danirus
Copy link
Owner

@danirus danirus commented Sep 12, 2020

The goal is to have a new field in each comment to keep the number of responses it has received.

  • XtdComment method _calculate_thread_data updates nested_count values for all the comments related with the new incoming comment.
  • When a comment is removed from the tree, the function publish_or_unpublish_nested_comments updates nested_count in parent comments, so that it only represents those comments that have is_public = True.
  • A new command initialize_nested_count updates the nested_count field in the DB. The command is idempotent.
  • Two new migrations added.
    • Migration 0007 adds the new nested_count field.
    • Migration 0008 populates values in the nested_count field.

@danirus danirus self-assigned this Sep 12, 2020
@danirus danirus marked this pull request as draft September 12, 2020 20:49
@danirus danirus merged commit 27f8890 into master Sep 26, 2020
@danirus danirus deleted the issue-106 branch September 26, 2020 15:17
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.

API function to retrieve the total number of replies in a given comment?
1 participant