CCP Metrics View Restructure: - Add GET /metrics endpoint (aggregated across verticals) - Add GET /metric/:id/verticals endpoint (per-vertical breakdown) - Replace VerticalTable with MetricTable on overview (one row per metric) - Add MetricDetailView for metric-first drill-down - Restructure navigation: Metric → Vertical → Subteam → Devices - Remove By Vertical table from AggregatedBurndownChart Jira Sync Fix: - Remove hardcoded project filter from getIssue() and searchIssuesByKeys() - Issue keys are globally unique; project filter broke cross-project tickets - Fixes 502 Bad Gateway when syncing tickets from non-STEAM projects
1.8 KiB
[Bug]: Jira sync fails for tickets in projects other than STEAM
Labels: kind/bug, status/resolved
Description
Syncing individual Jira tickets (or bulk "Sync All") fails with a 502 "Failed to fetch issue from Jira" error when the ticket belongs to a Jira project other than the configured JIRA_PROJECT_KEY (STEAM). For example, ticket AA_ADTRAN-541 in the AA_ADTRAN project cannot be synced because the JQL query hardcodes AND project = STEAM, which excludes all cross-project tickets.
This affects both single-ticket sync and the "Sync All" bulk operation.
Steps to Reproduce
- Go to the Jira Tickets page
- Add or have a ticket with a key from a non-STEAM project (e.g.,
AA_ADTRAN-541) - Click the sync button on that ticket (or click "Sync All")
- See browser alert: "Failed to fetch issue from Jira."
- Console shows:
POST /api/jira-tickets/:id/syncreturns 502 (Bad Gateway)
Environment
- Browser: Chrome (any)
- Server: Node.js on 71.85.90.9:3001
- Jira: Charter Jira Data Center (on-prem)
Root Cause
backend/helpers/jiraApi.js — both getIssue() and searchIssuesByKeys() constructed JQL with AND project = ${JIRA_PROJECT_KEY} (resolves to AND project = STEAM). Since Jira issue keys are globally unique (the project prefix is part of the key), this filter is redundant for key-based lookups and breaks any ticket not in the STEAM project.
Fix
Removed the AND project = ${JIRA_PROJECT_KEY} clause from:
getIssue()— now useskey = "${issueKey}"onlysearchIssuesByKeys()— now useskey in (...) AND updated >= -72honly
JIRA_PROJECT_KEY is still used for issue creation (where it belongs).
Relevant Log Output
POST http://71.85.90.9:3001/api/jira-tickets/:id/sync 502 (Bad Gateway)
Response: { "error": "Failed to fetch issue from Jira.", "details": "Issue not found" }