Skip to content

Fix epic ancestors widget not displaying content

euko requested to merge 436575-fix into master

What does this MR do and why?

The epic ancestors widget is not displaying its content. Related to #436575 (closed).

An example as reported in https://gitlab.slack.com/archives/CETG54GQ0/p1703262525967359: &12153 (closed)

The cause is a missing null check in one of the methods used in the issuable apollo client's cache configuration:

// app/assets/javascripts/graphql_shared/issuable_client.js#161
      EpicConnection: {
        merge(existing = { nodes: [] }, incoming, { args }) {
-          if (!args.after) {
+          if (!args?.after) {

!139622 (merged) seems to have refactored the same code last week.

Screenshots or screen recordings

Before After
image image

How to set up and validate locally

  1. Create three epics A, B, C

  2. Add B as the child epic to A

  3. Add C as the child epic to B.

  4. Visit C and confirm you can see A and B in the ancestors widget in the sidebar.

  5. Visit B and confirm you can see A as the ancestor epic in the sidebar.

Edited by euko

Merge request reports