Skip to content

fix(grafana): use account email in Work Logs "Code commits" panel to fix 0-commit count for users with multiple accounts#8925

Merged
Startrekzky merged 2 commits into
apache:mainfrom
bujjibabukatta:fix/#8833
Jun 16, 2026
Merged

fix(grafana): use account email in Work Logs "Code commits" panel to fix 0-commit count for users with multiple accounts#8925
Startrekzky merged 2 commits into
apache:mainfrom
bujjibabukatta:fix/#8833

Conversation

@bujjibabukatta

Copy link
Copy Markdown
Contributor

Fixes #8833

Problem

The "Code commits" panel in the Work Logs dashboard shows 0 commits when
a user's DevLake profile email differs from their GitHub account email.

Cause

The _accounts CTE was selecting u.email (DevLake user email) but the
join used c.author_id = a.email which expects the GitHub account email.

Fix

Changed u.email to a.email in the _accounts CTE so it correctly
uses the account email when matching commits.

Files Changed

  • grafana/dashboards/mysql/work-logs.json
  • grafana/dashboards/postgresql/work-logs.json

@Startrekzky Startrekzky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Startrekzky Startrekzky merged commit 46c5c51 into apache:main Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Grafana] Work Log / Code Commits panel error

2 participants