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

Entity listing - add related posts counter #171

Closed
mcolacino opened this issue Nov 14, 2015 · 4 comments
Closed

Entity listing - add related posts counter #171

mcolacino opened this issue Nov 14, 2015 · 4 comments
Assignees
Milestone

Comments

@mcolacino
Copy link
Contributor

In the backend, add the # of related posts as custom column within entity posts listing

@mcolacino mcolacino added this to the 3.2 milestone Nov 14, 2015
@mcolacino mcolacino added high and removed bug labels Nov 14, 2015
@mcolacino mcolacino self-assigned this Nov 29, 2015
@ziodave ziodave modified the milestones: 3.3, 3.2 Nov 30, 2015
@mcolacino
Copy link
Contributor Author

For the issue 1 we have to understand if have the new column sortable is a requirement or not: if it is, we have to choose how to implement it. We have (at least) two options

  1. we can pre-calculate the total number of related posts and save the results on the db: it's the approach natively used for comments count sortable columns
  2. we can calculate at runtime hacking the main wp query trough the posts clauses filter. This is why it's needed a custom join with the wl_relation_instances custom table.

@mcolacino
Copy link
Contributor Author

Also for the issue 3 we have to consider if we need to pre-calculate the value or calculating it at runtime during the filtering: the first option allows better performances during the filtering but at the same time potentially introduces sync issues.

@ziodave
Copy link
Member

ziodave commented Nov 30, 2015

For issue 1, this is the right way to do it (let's open a new issue for this specific implementation):

we can pre-calculate the total number of related posts and save the results on the db: it's the approach natively used for comments count sortable columns

@ziodave
Copy link
Member

ziodave commented Nov 30, 2015

For issue 3, also it's better to "precalculate" it. Let's open a separate issue where we can discuss the implementation.

@mcolacino mcolacino changed the title Enhance entity listing in the backend Entity listing - add related posts counter Dec 9, 2015
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

No branches or pull requests

2 participants