consuldemocracy / consuldemocracy

Consul Democracy - Open Government and E-Participation Web Software

Home Page:https://consuldemocracy.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Moderation comments: Error when rendering a link to hidden commentable

Senen opened this issue · comments

User Story

When a comment from a hidden Legislation::Proposal is shown in the moderation comments section the generated link is wrong, it points to an unexisting proposal instead of a legislation proposal.

Why is this Needed?

Avoid user confusion and generating unexisting URLs.

Description

We should avoid generating the commentable link when it's hidden.

Current Behavior

The application shows a link with an unexisting URL when the commentable is hidden.

Expected Behavior

The application does NOT show the link when the commentable is hidden, in place of the link, it should show the same as the administration comments section.

Steps to reproduce

  1. Hide a legislation proposal with comments
  2. Go to the moderation comments section and verify the comments from the legislation proposal have badly generated links.

Definition of Done

The application does NOT show the link when the commentable is hidden, in place of the link, it should show the same as the administration comments section.