Skip to content

Show full reference path on vue issuables list

When fetching a list of issues through the public API, the results do not include the reference path for each issue (e.g. #12345 on project issues, gitlab-ce#123456 on group issues, or gitlab-org/gitlab-ce#12345 on user issue dashboard).

image

The reference path is required by the Vue issuable list component (gitlab-org/gitlab-ee!15091), which pulls issues via the public API. Currently, it is displaying the reference path like ${ token }${ issuable.iid } where token is # for issues or ! for MRs, but does not take into account the project identifier.

The Issues and MR API endpoints should return a reference_path field, just like our Ruby API, that is scoped properly depending on where the issues are being displayed (project, group, user).

Follow-up

app/assets/javascripts/issuables_list/components/issuable.vue should be updated:

  1. The token prop should be removed.
  2. The referencePath computed property should be removed.
  3. Where referencePath is displayed in the template, issuable.reference_path should be displayed instead.
Edited by Scott Stern