Skip to content

Fix epic items not loading for signed out users

Nicolas Dular requested to merge nd/fix-default-project-for-signed-out-user into master

What does this MR do and why?

Issue: #376303 (closed)

When querying child items for epics, we also query defaultProjectForIssueCreation. The Finder to query the last event expects a signed-in user and therefore failed when the user is not signed in.

This MR fixes it by not calling the EventFinder when there is no signed in user.

Screenshots or screen recordings

Before After
Child items would not load, and user sees an error Child items load again
before after

How to set up and validate locally

  1. Create a public Group
  2. Create an epic within that Group
  3. Go to the epic's page as a signed in/out user. You will see an error with the signed out user.
  4. Or, Execute the following query that would fail without this MR:
query defaultProject {
  group(fullPath:"gitlab-org"){
    id
    epic(iid:"15") {
      id
      defaultProjectForIssueCreation {
        id
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Nicolas Dular

Merge request reports