Repository navigation
Conversation
Several DevLake projects can share one board and each collect their own slice of it (e.g. via Jira ExtraJQL). Record which project a board/issue link belongs to by adding project_name to board_issues. It is part of the primary key so an issue that falls into two projects' slices can be linked once per project. Existing rows and plugins that do not set it get an empty project_name, which keeps the previous single-project behaviour. The e2e snapshots that verify board_issues gain the (empty) project_name column. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add project_name to _tool_jira_board_issues (part of the primary key) and ProjectName to JiraApiParams. The issue collector and extractor stamp the DevLake project the pipeline runs for, so a board shared by several projects keeps each project's ExtraJQL slice apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The issue convertor used to read every _tool_jira_board_issues row of the board, so on a shared board one project's run converted (and stamped) the other projects' issues too. Filter its input by project_name and stamp the project on the domain board_issues row. Boards without any per-project stamps (single-project or pre-feature data) keep converting all of their issues. On a board that has stamps, unstamped leftover rows are excluded rather than attributed to every project. Adds gorm.io/driver/sqlite (already in go.sum) for the in-memory tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The board filter collectors only compared the saved filter JQL to decide whether a full resync is needed. Fold the rendered ExtraJQL into that key so changing ExtraJQL also triggers a full resync, and issues that no longer match are unlinked from the board instead of lingering in board_issues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ConvertIssuesToIncidents and ConnectIncidentToDeployment selected incidents by board-level project_mapping only, so every project sharing a board got every incident on it. Also filter on board_issues.project_name, falling back to the whole board when it has no per-project stamps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Apply the same board_issues.project_name filter to the incident queries of the DORA dashboards (mysql: DORA, dora-by-team, dora-debug and the change-failure-rate / failed-deployment-recovery-time / time-to-restore-service details; postgresql: DORA, dora-by-team), with the same whole-board fallback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When several DevLake projects point at the same Jira board and each narrows it with its own ExtraJQL, the DORA metrics that depend on incidents (Change Failure Rate, MTTR / failed deployment recovery time) counted the whole board for every project, so one project's incidents leaked into the others' numbers.
This PR records which project collected each board issue and filters on it end to end. It is split into commits that each build and pass tests on their own, so it can be reviewed commit by commit:
feat(core): add project_name to board_issues: newproject_namecolumn, part of the primary key so an issue in two projects' slices can be linked once per project, with default''. Migration20260820. Existing e2e snapshots that verifyboard_issuesgain the (empty) column.feat(jira): record the collecting project on board issues:project_nameon_tool_jira_board_issues(migration20260710) andProjectNameonJiraApiParams. The issue collector and extractor stamp the pipeline's project.ProjectNameisomitemptyin the serialized raw-data params, so pipelines without a project keep exactly the same params (no re-collection and no orphaned raw data on upgrade).feat(jira): convert only the current project's slice of a shared board: the issue convertor reads only the current project's tool rows and stamps the project on domainboard_issues.fix(jira): resync the board when its ExtraJQL changes: the rendered ExtraJQL is folded into the board filter's change-detection key, so changing ExtraJQL triggers a full resync and issues that no longer match get unlinked from the board.feat(dora): scope incidents and deployment links to the project's slice:ConvertIssuesToIncidentsandConnectIncidentToDeploymentfilter onboard_issues.project_name.feat(grafana): filter DORA incident panels by project: the same filter in the incident queries of the DORA dashboards (mysql: DORA, dora-by-team, dora-debug, dora-details-change-failure-rate, dora-details-failed-deployment-recovery-time, dora-details-timeto-restore-service; postgresql: DORA, dora-by-team).Backward compatibility: if a board has no per-project stamps at all (single-project setups, or data collected before this change), every query keeps the previous whole-board behavior. If a board does have stamps, unstamped or NULL rows are treated as an ambiguous leftover pool and excluded, instead of being attributed to every project.
Does this close any open issues?
N/A
Screenshots
N/A
Other Information
gorm.io/driver/sqliteas a direct dependency; it was already ingo.sum.plugins/jira/tasks/issue_convertor_project_filter_test.goplugins/jira/tasks/issue_extractor_test.go(TestExtractIssuesStampsProjectName)plugins/dora/tasks/incident_from_issue_generator_test.goplugins/dora/tasks/incident_deploy_connector_test.gotablecolumn per dialect (backticks on MySQL, double quotes otherwise), so they run on MySQL, Postgres and SQLite.test-e2eon both MySQL and Postgres (all plugin e2e suites plustest/e2e/remoteandtest/e2e/services), golangci-lint, migration-script-lint and check-grafana-dashboards: [fork CI] feat(dora): per-project DORA isolation for shared Jira boards kesamba/devlake#1🤖 Generated with Claude Code