Skip to content

Support mentioning epics

Requirements

  • If there is a url to an epic in a textbox, when it is rendered, it will be rendered as an epic link, per the formatting here: https://gitlab.com/gitlab-org/gitlab-ee/issues/3853#note_47359905
  • If the user viewing the page does not have access to view the epic, the link will not be rendered. They will just see plain text.
  • You can simply paste the url of an epic in a textbox. Autocomplete is not in scope for this issue.
  • Whenever an epic url is saved in a textbox in an object (like an issue or merge request or epic), a system note in the epic itself will be logged, pointing back to that issue or merge request or epic.
  • The format is:
    • Victor Wu @victorwu mentioned in issue #3254 2 weeks ago
    • Victor Wu @victorwu mentioned in merge request !3254 2 weeks ago
    • Victor Wu @victorwu mentioned in epic <full-path>/&3254 2 weeks ago
  • Note that these system notes will not be visible in epics themselves until https://gitlab.com/gitlab-org/gitlab-ee/issues/3889 is implemented. But they should already be stored in the system.

Edge cases

  • None yet

Original description

Support epics references from other gitlab object.

Possible issues

  • group instead of project is the epic parent
  • the code works with different texts on different places - sometimes we use plain version (-> &) sometimes we use html escaped version (-> &amp;) - possible solutions might be
    • to include both & and &amp; as prefix (how to add this to the regex?)
    • investigate if we could always use the same version of the text (probably far too complicated as we transform text on multiple places)
    • change the prefix (however the problem might appear at some point later anyway in case we decide to add new mentionables)

Consider changing skip_project_check to for_personal_snippet to make the filter clearer

/cc @victorwu @smcgivern

Edited by Victor Wu