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
- Hide a legislation proposal with comments
- 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.