Skip to content

fix(grafana): filter Jira sprint velocity by owning board and time range - #9371

Open
dmorfav wants to merge 1 commit into
apache:mainfrom
dmorfav:fix/jira-sprint-velocity-filter
Open

dmorfav wants to merge 1 commit into
apache:mainfrom
dmorfav:fix/jira-sprint-velocity-filter

Conversation

@dmorfav

@dmorfav dmorfav commented Nov 11, 2026

Copy link
Copy Markdown

Summary

Fixes the Sprint Velocity: Committed vs Completed Story Points [Closed Sprints] panel of the Jira dashboard (grafana/dashboards/mysql/Jira.json).

The panel joined sprints with board_sprints only by board_id. The Jira Agile API returns, for a board, every sprint any of its issues has ever been in, so the panel also plotted sprints owned by other boards. It also had no $__timeFilter, so every historical sprint was shown regardless of the selected range. On long-lived boards this made the chart unreadable.

This PR adds two conditions to the panel query:

AND s.original_board_id = bs.board_id
AND $__timeFilter(s.completed_date)

Verified on v1.0.3-beta19 against a real Jira board: before, the panel mixed sprints from several unrelated boards going back years; after, it shows only the board's own closed sprints within the selected range. No other panels are touched.

Does this close any open issues?

Closes #9369

Screenshots

Not included, as they contain internal sprint names. Happy to describe the before/after in more detail if needed.

The Sprint Velocity panel joined sprints with board_sprints only by board_id, so it also showed sprints owned by other boards (Jira returns every sprint any of the board's issues has been in) and ignored the dashboard time range.

Only keep sprints whose original_board_id is the selected board and whose completed_date is within the selected range.

Closes apache#9369
@dmorfav
dmorfav force-pushed the fix/jira-sprint-velocity-filter branch from 317987d to 3c091f5 Compare November 11, 2026 13:44
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] Jira dashboard Sprint Velocity panel ignores time range and includes sprints from other boards

1 participant