Skip to content

Fix Roadmap not loading when epics have inaccessible parents

What does this MR do and why?

Fixes a bug where Roadmap breaks during loading if any epic has a parent that's inaccessible to the current user to due permissions. Additionally, it also fixes an issue where number of epics shown on Roadmap are too few such that there's an empty space below the roadmap instead of having a proper empty row (see before/after screenshots).

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Notice the whitespace below Roadmap timeline;

Before After
Untitled Untitled

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Take two groups containing epics; A and B.
  2. Make sure all the epics of both the groups have at least start or due date set.
  3. Make sure both A and B groups are Private.
  4. Take a user in your GDK, eg; foo and make them member of A (with role being Developer), make sure they're not member of B though.
  5. Take any Epic from group B and add a child epic from group A.
  6. Login as user foo, you can alternatively impersonate them from Admin area, see https://docs.gitlab.com/ee/administration/admin_area.html#user-impersonation
  7. Go to Roadmap of group A, it will break with JS errors without fixes made in this MR, but on this MR's branch, it will load without issues.

Related to #474167 (closed)

Merge request reports

Loading