- Issue created by @AaronMcHale
We have a need to present information to users about:
Doing this is possible using entity queries, but those queries are not simple, due to the nature of how comments are stored.
For example, adding this condition to an entity query to get the number of unresolved comments condition('attributes', '"resolved_at": null', 'CONTAINS')
.
While it's quite possible to do this in custom code, it starts to touch on the internals of how comments are stored, and any change to that risks breaking these queries, so it feels like something which would be better handled by methods on either the Comment storage class, or in a dedicated service class.
It would also be useful if these methods could look for any entity_reference_revision fields on the entity, and if any are found, use those entity IDs in an entity query as well. This would also factor in paragraphs, where returning a comment count for a given node would then also include any comments on the paragraphs in that node.
Active
1.3
Plugin: Collaboration