Skip to content

Add "Closed Issues" to Issue Analytics chart

Rudy Crespo requested to merge 233905-add-closed-issues-to-issues-analytics into master

What does this MR do and why?

As the last MR to solve #233905 (closed), this MR does the following:

  1. Adds "Issues Closed" to the Issue Analytics chart.
  2. Creates a new total_issues_analytics_chart component similar to the original chart (issues_analytics_chart) except that it uses a stacked column chart to better accommodate both opened and closed issue counts per month (and later total opened issues at end of month in the secondary y-axis line). It also uses Apollo instead of Vuex.
  3. Renders total_issues_analytics_chart if user is a GitLab Ultimate customer and the issues_completed_analytics_feature_flag feature flag is enabled, otherwise displays issues_analytics_chart (which does not include "Issues closed")
  4. Creates a query builder to generate queries for each month within a given date range for issueCount and issuesCompleted.
  5. Removes the != operator from the filtered search dropdowns since it isn't currently supported by either the issueCount or issuesCompleted GraphQL queries.
Task Status
Add issues_completed_analytics GitLab Ultimate feature and issues_completed_analytics_feature_flag feature flag ( !128399 (merged))
Refactor issues_analytics.vue
Create new chart with "Issues closed"

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description Screenshot
Default Screenshot 2023-09-01 at 6.57.27 PM.png
Loading* Screenshot 2023-09-01 at 8.14.45 PM.png
Error Screenshot 2023-09-01 at 8.17.10 PM.png
No data empty state Screenshot 2023-09-01 at 8.18.23 PM.png
Empty state for no data with filters applied Screenshot 2023-09-01 at 8.20.09 PM.png

*Loading screen to be updated in #422575

How to set up and validate locally

  1. Make sure you have a GitLab Ultimate license
  2. Feature.enable(:issues_completed_analytics_feature_flag)
  3. Go to a group/project with issues, and visit http://{LOCAL_INSTANCE}/groups/{GROUP_PATH}/-/issues_analytics or http://{LOCAL_INSTANCE}/{GROUP_PATH}/{PROJECT_PATH}/-/analytics/issues_analytics
  4. Verify that the new chart appears and that the filters work correctly (for more info, visit https://docs.gitlab.com/ee/user/analytics/issue_analytics.html)

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 #233905 (closed)

Edited by Rudy Crespo

Merge request reports