Discussion note URLs are inconsistent between `/epics` and `/work_items`

Summary

On epics which are not migrated to be work items, new discussion notes have their URLs based on /work_items instead of /epics. This causes comment permalinks to reload the page when a comment is referenced in the same epic.

Proposal

We need to update rendered discussion URL to match the currently open work item URL, i.e. if the page is being viewed as /work_item, the URL needs to be based on /work_item.

Edited by Kushal Pandya