Rendering (closed) does not work correctly for newly closed issues
Summary
When an issue is closed it should be rendered with "(closed)" appendix. That however does not work properly for issues closed after the link is inserted.
This behavior happens for both description and comments.
Steps to reproduce
- create a project
- create issue A in that project (
#1) - create issue B in that project (
#2), mention issue A in the description - close issue A
- reload the page
What is the current bug behavior?
First the text is rendered correctly (#1 (closed) is rendered) but then the text changes to #1 and closed is removed
What is the expected correct behavior?
The text is rendered correctly (#1 (closed))
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
The IssuableStateFilter works correctly, correct text is still in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/views/projects/issues/show.html.haml#L64 . I suppose something happens afterwards.
Also probably after the html field on the issue (description_html) is updated it works correctly.
