Issues Analytics: Add "Issues closed" - total issues closed
## Release notes
Introducing Enhanced "Issues Analytics" for Deeper Project Insights!
We've added a new metric - "Issues closed" to the "Issues Analytics" report to help software leaders to track the total number of resolved issues over a specific period. With this valuable addition, Gitlab users can now gain insights into trends associated with their projects and improve the overall turn-around time and value delivered to their customers.
The "Issues Analytics" visualize via bar the number of issues for each month, with a default time span of 13 months, and can be access via drill-down from Value Streams Dashboard.
## Problem to solve
- Issues analytics only shows opened issues - this information isn't too valuable by itself.
- [Users want](https://gitlab.com/gitlab-org/gitlab/-/issues/196542) to see total number of issues superimposed with issue activity. This is one of the ["Lifecycle metrics"](https://gitlab.com/groups/gitlab-org/-/epics/9892).
- Issues analytics is one of the drill-down from [Value Streams Dashboard](https://docs.gitlab.com/ee/user/analytics/value_streams_dashboard.html#dashboard-metrics-and-drill-down-reports).
### Intended users
* [Parker (Product Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#parker-product-manager)
* [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead)
# Proposal
Adding to Issues Analytics:
- [ ] Group-level & Project-level.
- [ ] Remove `dataZoom` component from chart
- [ ] Adding new `Y axis bars` for ["Issues closed"](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/121774), in addition to the current "Issues created".
- [ ] As not all filters are available on this new endpoint, introduce the change behind a feature flag and reduce the selectable labels to those which are supported when the feature flag is enabled.
- [ ] Adding tooltip interaction ([Example](https://echarts.apache.org/examples/en/editor.html?c=mix-line-bar)).
- [ ] Issues closed - the number of issues closed each month for ~"GitLab Ultimate" only. Issues created, same as today for ~"GitLab Premium" ~"GitLab Ultimate". [Reasoning](https://gitlab.com/gitlab-org/gitlab/-/issues/233905#note_1472151197).
- the data should be available on the GraphQL API with the usual restrictions (maximum 10K rows, premium or ultimate):
```graphql
query {
group(fullPath: "gitlab-org") {
flowMetrics {
issuesCompletedCount(from: "2022-01-01", to: "2022-02-01") {
unit
value
}
}
}
}
```
#### Design source
[❖ Figma project →](https://www.figma.com/file/WjSOsxGgCFN2tGIlpKJFpQ/Issues-Analytics%3A-Add-total-issues-completed-%23233905?type=design&node-id=1%3A2&t=zEOymK6NGGBlUdwM-1)
## Related ~"Customer feedback"
- https://gitlab.com/gitlab-org/gitlab/-/issues/389093+
- https://gitlab.com/gitlab-org/gitlab/-/issues/381787#note_1248653456
- https://gitlab.com/gitlab-org/gitlab/-/issues/196542
- ~Dogfooding opportunity - https://app.periscopedata.com/app/gitlab/1019503/Reliability-Team-Dashboard
## Next iterations
- https://gitlab.com/gitlab-org/gitlab/-/issues/417435+
- https://gitlab.com/gitlab-org/gitlab/-/issues/419493+
- https://gitlab.com/gitlab-org/gitlab/-/issues/351552+
## old Links / references
<details><summary>Click to expand</summary>
- Related to [Q3 Dogfooding OKR](https://gitlab.com/gitlab-com/www-gitlab-com/-/issues/8303)
#### Technical notes
You need to `Feature.enable(:new_issues_analytics_chart_data)` in rails console to get new data format for issues analytics chart. See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46444 for details
- Add total open (accumulated) issues to chart in project-level issues analytics, see discussion [here](https://gitlab.com/gitlab-org/gitlab/-/issues/247271#note_410401233)
- Requires [this component](https://gitlab.com/gitlab-org/gitlab-ui/-/issues/889)
</details>
issue