Skip to content

Add support for viewing and creating objectives within an objective in a hierarchy tree

Florie Guibert requested to merge poc/okr into master

What does this MR do and why?

This MR adds ability to view children Objectives and Key Results within an Objective created under a project, it also allows for creating or adding an existing objective from the hierarchy tree view.

Limitations

The tree view currently doesn't support creating or adding Key Result, it will be added once #381833 (closed) & #385084 (closed) are addressed.

Screenshots or screen recordings

Tree View Empty State Tree View with Objectives
image image
Objective with Indirect Children Objective with NO Indirect Children
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Open rails console by running bin/rails console within GDK directory.
  2. Enable the feature flag :hierarchy_db_restrictions on a project; Feature.enable(:hierarchy_db_restrictions, Project.find_by_full_path('gitlab-org/gitlab-test')).
  3. Enable the feature flag :okrs_mvc on the same project; Feature.enable(:okrs_mvc, Project.find_by_full_path('gitlab-org/gitlab-test')).
  4. Visit issues list page for the project by navigating to http://gdk.test:3000/gitlab-org/gitlab-test/-/issues.
  5. Create an objective by clicking on dropdown button next to New issue and selecting New objective from the dropdown.
  6. Once objective is created, click on it to visit its Work Item page, you should be able to see Tree View below the description.
  7. Use Add dropdown button create/add objectives.

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 Issues

#381872 (closed)

Edited by Kushal Pandya

Merge request reports