Closing of duplicate issues?

If we have added a duplicate issue as a comment to an existing issue, like “duplicate of #”, shouldn’t that issue be closed automatically when the first issue has been resolved and closed?
Is there any way to achieve this?