Resolve "Fix issue with resource_parent in FOSS instances"
What does this MR do and why?
In case of newly added group access request todos, value of project is nil. Previously in case of todos in FOSS, the resource_parent
method was returning todo's project as all the todos had project as non null. So when there is a group access request todo in a FOSS instance, an exception is raised because of null resource_parent being returned in method https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/helpers/todos_helper.rb#L58 for them.
This MR adds todo's group in the resource_parent method in case if the project is nil.
Group access request todos were added in MRs !103316 (merged) and !106554 (merged).
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- In a FOSS instance, create a public group named
public_group
from account of useruser1
. - Raise 'access request' for this
public_group
from account of another useruser2
. - There should not be any error when
user1
opens its todos, and their should be an access request todo present in the list.
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.
Related to #388824 (closed)