Add weight to epics (Ensure work item weight widget works as expected within the work item hierarchy)
### Release notes
You can now assign weights to epics, allowing you to estimate and prioritize large-scale initiatives more effectively. This new feature not only helps you with initial planning but also automatically updates the epic's weight as you break it down into smaller issues, giving you real-time insights into the scope and progress of your projects.
## Summary
This epic focuses on implementing a feature that allows users to assign weight to epics in GitLab.
Early in the planning process, Product Managers (PMs) can enter a preliminary "thumb in the wind" weight before the epic is broken down into individual issues. As the epic progresses and is decomposed into child issues, the actual weight from these issues will automatically roll up to the parent epic, mirroring the rollup behavior used by the Project Management team when aggregating weights from child tasks to parent issues.
- **User Value:** Helps teams improve planning, prioritize work, and allocate resources more effectively by understanding the relative size of epics.
- **Product Roadmap Alignment:** This work aligns with our ["Accelerate Plan Adoption" product roadmap north star](https://gitlab.com/groups/gitlab-org/plan-stage/product-planning/-/wikis/Home/1-Product-Roadmap#sparkles-planning-and-prioritizing-north-stars) by allowing enterprises to better estimate, plan, and manage large-scale initiatives. By offering a comprehensive solution that includes epic-level weighting, GitLab can attract organizations that require detailed, multi-level project planning and previously hesitated due to this gap in functionality.
- **Scope:** Includes the ability to set, edit, and display both preliminary and rolled-up weights for epics. Excludes changes to existing issue weighting functionality. Weight rollup will be supported across all levels of nesting, as defined [here](https://gitlab.com/gitlab-org/gitlab/-/issues/436096).
#### User Experience
1. **Behavior:** Users can assign a preliminary weight to an epic early in the planning process. As issues are created and assigned weights, these will roll up and update the epic’s total weight automatically.
1. **Usability:** The interface will clearly differentiate between the initial "thumb in the wind" weight and the rolled-up weight from child issues.
#### User Stories
1. As a **product manager**, I want to assign a preliminary weight to an epic during the quarterly planning phase so that I can estimate the overall effort required and determine how many feature-level epics can be planned for the quarter given the known capacity. This preliminary weight helps compare the size of feature epics against one another and aids in prioritization and resource allocation.
- **Acceptance Criteria**: The weight field is available in the epic detail and roadmap views for initial estimation.
1. As a **project manager**, I want the weight of an epic to update automatically based on the weights of child issues so that I can see the real-time total effort.
- **Acceptance Criteria**: The epic automatically calculates and displays the total weight from all child issues, as defined [here](https://gitlab.com/gitlab-org/gitlab/-/issues/436096).
1. As a **engineering manager**, I want to see both the preliminary and final rolled-up weights of an epic so that I can work with my Product manager to hone future estimations during the planning phase.
- **Acceptance Criteria**: The interface shows both the initial weight assigned during planning and the updated rolled-up weight from child issues, allowing for more accurate refinement of estimates as the epic evolves. This supports more precise capacity planning and resource allocation.
### Definition of Done (DoD)
- All user stories are completed and meet their acceptance criteria.
- The feature is user-tested and meets usability requirements.
- The rollup functionality is consistent with existing behaviors in the Project Management tools. [reference](https://gitlab.com/gitlab-org/gitlab/-/issues/436096)
- GitLab documentation is updated to reflect the new epic weighting feature.
- The new feature is instrumented to capture product usage metrics.
### Validation Research
- https://gitlab.com/gitlab-org/ux-research/-/issues/2831
- https://gitlab.com/gitlab-org/ux-research/-/issues/2261
- https://gitlab.dovetailapp.com/insights/Informative-insight-Estimating-above-issues-stories-is-often-more-ad-hoc-with-different-UOMs-than-lo-1pfrCN7sJ06jGCEakgPgdn
epic