Fix epic items not loading for signed out users
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
- Create a public Group
- Create an epic within that Group
- Go to the epic's page as a signed in/out user. You will see an error with the signed out user.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Nicolas Dular