Add support for viewing and creating objectives within an objective in a hierarchy tree
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 |
---|---|
![]() |
![]() |
Objective with Indirect Children | Objective with NO Indirect Children |
---|---|
![]() |
![]() |
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Open rails console by running
bin/rails console
within GDK directory. - Enable the feature flag
:hierarchy_db_restrictions
on a project;Feature.enable(:hierarchy_db_restrictions, Project.find_by_full_path('gitlab-org/gitlab-test'))
. - Enable the feature flag
:okrs_mvc
on the same project;Feature.enable(:okrs_mvc, Project.find_by_full_path('gitlab-org/gitlab-test'))
. - Visit issues list page for the project by navigating to
http://gdk.test:3000/gitlab-org/gitlab-test/-/issues
. - Create an objective by clicking on dropdown button next to
New issue
and selectingNew objective
from the dropdown. - Once objective is created, click on it to visit its Work Item page, you should be able to see Tree View below the description.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related Issues
Merge request reports
Activity
assigned to @fguibert
- A deleted user
added backend database databasereview pending featureaddition frontend typefeature labels
2 Warnings This merge request is quite big (1017 lines changed), please consider splitting it into multiple merge requests. featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer frontend Alex Pennells (
@apennells
) (UTC-5, 6 hours behind@fguibert
)Kushal Pandya (
@kushalpandya
) (UTC+5.5, 4.5 hours ahead of@fguibert
)test for spec/features/*
Tyler Amos (
@tyleramos
) (UTC-5, 6 hours behind@fguibert
)Maintainer review is optional for test for spec/features/*
UX Becka Lippert (
@beckalippert
) (UTC-6, 7 hours behind@fguibert
)Maintainer review is optional for UX To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 898fb4ce and 8a226d2f
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.51 MB 3.51 MB - 0.0 % mainChunk 1.95 MB 1.95 MB - 0.0 %
Note: We do not have exact data for 898fb4ce. So we have used data from: 086f1497.
The intended commit has no webpack pipeline, so we chose the last commit with one before it.Please look at the full report for more details
Read more about how this report works.
Generated by
DangerAllure report
allure-report-publisher
generated test report!e2e-review-qa:
test report for 8a226d2fexpand test summary
+-----------------------------------------------------------------------------------------+ | suites summary | +------------------------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Version sanity check | 0 | 0 | 1 | 0 | 1 | ➖ | | Verify | 12 | 0 | 1 | 0 | 13 | ✅ | | Manage | 39 | 0 | 4 | 6 | 43 | ❗ | | Plan | 49 | 0 | 1 | 0 | 50 | ✅ | | Govern | 15 | 0 | 5 | 3 | 20 | ❗ | | Feature flag handler sanity checks | 9 | 0 | 0 | 0 | 9 | ✅ | | Create | 28 | 0 | 1 | 0 | 29 | ✅ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Configure | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Total | 152 | 0 | 15 | 9 | 167 | ❗ | +------------------------------------+--------+--------+---------+-------+-------+--------+
FYI @kushalpandya I will be working on this branch until I go on PTO. It contains a backend dependency and I'll write as many tests as possible for the frontend
mentioned in issue gitlab-org/incubation-engineering/okr/meta#9 (closed)
mentioned in issue #383597 (closed)
Setting label groupproduct planning based on
@fguibert
's group.added groupproduct planning label
removed databasereview pending label
added devopsplan sectiondev labels
added 210 commits
-
a9639fe4...915918eb - 207 commits from branch
master
- a3cc881c - added has_children
- ee68744a - Merge remote-tracking branch 'origin/jp-hierarchy-poc' into poc/okr
- 599e2e0e - Add nested Objective children
Toggle commit list-
a9639fe4...915918eb - 207 commits from branch
- A deleted user
added databasereview pending label
added 223 commits
-
ca5becb2...8aca1004 - 219 commits from branch
master
- 585cc6a5 - Add default hierarchy restrictions
- 0c044e33 - POC using hierarchy restrictions
- 5d5e16ad - added has_children
- 1ad02e60 - Add nested Objective children
Toggle commit list-
ca5becb2...8aca1004 - 219 commits from branch
- Resolved by Kushal Pandya
- Resolved by Kushal Pandya
- Resolved by Kushal Pandya
- Resolved by Kushal Pandya
assigned to @kushalpandya
changed milestone to %15.7
mentioned in design management/design #381497 (closed)[Viewing_key_results.png]
added 710 commits
-
00372f1e...8eb10c44 - 707 commits from branch
master
- 14acf1d5 - POC using hierarchy restrictions
- a7731242 - added has_children
- 160c7366 - Add nested Objective children
Toggle commit list-
00372f1e...8eb10c44 - 707 commits from branch
added 1456 commits
-
905af2b6...1100a4be - 1455 commits from branch
master
- a9135180 - Add support for creating child Work Items
-
905af2b6...1100a4be - 1455 commits from branch
mentioned in issue #385084 (closed)
added 193 commits
-
a9135180...0b8a89e7 - 192 commits from branch
master
- 5e82ea49 - Add support for creating child Work Items
-
a9135180...0b8a89e7 - 192 commits from branch
- Resolved by Natalia Tepluhina
- Resolved by Natalia Tepluhina
- Resolved by Kushal Pandya
- Resolved by Natalia Tepluhina
added UX label
- Resolved by Kushal Pandya
removed databasereview pending label