Skip to content

Resolve "Fix issue with resource_parent in FOSS instances"

Hitesh Raghuvanshi requested to merge 388824-fix-group-todo-issue into master

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.

  1. In a FOSS instance, create a public group named public_group from account of user user1.
  2. Raise 'access request' for this public_group from account of another user user2.
  3. 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.

Related to #388824 (closed)

Edited by Hitesh Raghuvanshi

Merge request reports