Skip to content

feat: Team-wise Productivity Leaderboard Integration

Kaveri Mamidi requested to merge feature-team-productivity into feature-final

What does this MR do?

This merge request implements the Team-wise Productivity Leaderboard Dashboard inside the GitLab Compliance & Analytics Tool.

It integrates frontend UI, backend GitLab API logic, and team aggregation logic to provide:

Team-level productivity overview

Individual member performance metrics

Leaderboard ranking based on commits

Real-time GitLab data integration

Motivation / Use Case

Previously, there was no consolidated way to:

View productivity team-wise

Compare member contributions

Analyze commits, MRs, and issues at team level

This feature solves that by:

Allowing selection of teams from predefined mapping

Aggregating commits, MRs, and issues automatically

Displaying leaderboard rankings

Providing individual member performance insights

It improves visibility into contribution tracking and team analytics.

Implementation Notes

Added complete team mapping (including Dev 3, Trinity, Sudo, Synergy Six, Code Dev, SPK, etc.)

Integrated:

get_team_productivity()

get_user_productivity()

Implemented:

Team Overview section

Leaderboard table (sorted by commits)

Bar chart comparison

Individual performance metrics

Added proper loading states using st.spinner()

Added error handling for:

API failures

Empty data

Unauthorized access

Ensured no breaking changes to existing features

Used modular structure to maintain readability

No breaking changes introduced.

How to Test

Pull this branch:

git checkout feature-team-productivity

Run the application:

streamlit run app.py

In the sidebar:

Enter GitLab URL: https://code.swecha.org

Enter valid Personal Access Token

Select Team-wise Productivity

Verify:

Team dropdown loads correctly

Member dropdown updates dynamically

Team metrics display

Leaderboard sorted by commits

Bar chart renders correctly

Individual member metrics display properly

Confirm no crashes or errors.

Checklist

Feature is documented

Code is clean and readable

No breaking changes

Local testing completed

Feature works as intended Related issues: #40 (closed)

Edited by Kaveri Mamidi

Merge request reports

Loading