feat: Switch BAD Issues/MRs to assignee-based queries and add issue tracking metrics
Summary
Enhanced the BAD Issues and BAD MRs analysis to fetch data based on assignee instead of author, and added comprehensive issue tracking metrics including total assigned and opened issues.
Changes Made
Backend Changes (gitlab_utils/client.py):
-
Assignee-based queries: Updated
_fetch_user_issues()and_fetch_user_mrs()to support bothauthor_idandassignee_idfilters via newissue_scopeandmr_scopeparameters -
Issue metrics expansion:
- Added
Total AssignedandOpened Issuestracking to_ZERO_ISSUE_ROW - Added
is_openedflag to_evaluate_single_issue()to differentiate opened vs closed issues
- Added
-
Removed improper description:
- Removed
improper_descflag from MR and issue evaluation logic - Removed
analyze_description()import (no longer needed) - Cleaned up both
_ZERO_ROWand_ZERO_ISSUE_ROWtemplates
- Removed
Frontend - BAD Issues (modes/bad_issue.py):
- Updated summary metrics to display 4 columns: Total Assigned, Opened Issues, Closed Issues, Total Users
- Enhanced single-user metrics display with assigned/opened/closed breakdown
- Updated Excel export to include new metrics: Total Assigned, Total Opened, Total Closed Issues
- Removed "Improper Desc" from all UI components and reports
- Reorganized metrics display for better readability
Frontend - BAD MRs (modes/bad_mrs_batch.py):
- Updated docstring to reflect assignee-based API endpoint
- Modified
cached_batch_evaluate_mrs()andcached_single_user_mrs()to usemr_scope="assignee" - Updated Excel export summary to remove "Improper Desc"
- Updated single-user metrics display with new metric layout
Benefits
Testing
- Verify BAD Issues report shows Total Assigned, Opened, and Closed counts
- Verify single user metrics display correctly for both assigned issues and MRs
- Verify Excel exports include all new metrics
- Confirm no "Improper Desc" appears in any reports