Add possibility to show comment status in views and to filter on comment status

Created on 7 February 2019, over 5 years ago
Updated 8 April 2023, about 1 year ago

Problem/Motivation

The comments attached to the entity has the attributes 'status' which controls whether comments can be seen/posted. But seems like no possibility to show that status in the views and not possibility to filter on that status.
P.S. It's very strange that I cannot find the issue related to this. Maybe I'm missing something.

Testing steps

  1. Apply the patch.
  2. Clear cache.
  3. Add/Edit the comment field of node.
  4. On Node Manage Display for the Comment field a new formatter should be available in the select list ("Comment Status").
  5. On selecting and saving the settings, this should show the comment status for each of the comment.

Proposed resolution

Seems like the filter plugin is already created but is not used anywhere. I propose to create field plugin which displays that status and add both plugins (field and filter) to field_views_data.

Seems like InOperator plugin feels very bad when options are instances of TranslatableMarkup. So for now I'm casting options to string. Maybe in the future it will be possible to find better solution.

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Data model changes

None.

✨ Feature request
Status

Needs work

Version

10.1 ✨

Component
CommentΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡¦Ukraine mpolishchuck

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024