From 59b13778e28b98c797a57fa8b1b2b113fa5ad114 Mon Sep 17 00:00:00 2001 From: "Pablo Fernandez Guerra (PFE)" <148432447+pfe-nazaries@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:03:55 +0200 Subject: [PATCH] fix(ui): show scan in Findings filter from View Findings action (#11997) Co-authored-by: Pablo F.G --- ui/changelog.d/findings-scan-filter-selection.fixed.md | 1 + ui/components/scans/table/scan-jobs-row-actions.test.tsx | 2 +- ui/components/scans/table/scan-jobs-row-actions.tsx | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 ui/changelog.d/findings-scan-filter-selection.fixed.md diff --git a/ui/changelog.d/findings-scan-filter-selection.fixed.md b/ui/changelog.d/findings-scan-filter-selection.fixed.md new file mode 100644 index 0000000000..ff1f70c117 --- /dev/null +++ b/ui/changelog.d/findings-scan-filter-selection.fixed.md @@ -0,0 +1 @@ +`Scan ID` filter on the Findings page now shows the active scan when opening findings from a scan's `View Findings` action diff --git a/ui/components/scans/table/scan-jobs-row-actions.test.tsx b/ui/components/scans/table/scan-jobs-row-actions.test.tsx index d0d2b191cc..e547374098 100644 --- a/ui/components/scans/table/scan-jobs-row-actions.test.tsx +++ b/ui/components/scans/table/scan-jobs-row-actions.test.tsx @@ -333,7 +333,7 @@ describe("ScanJobsRowActions", () => { // Then expect(pushMock).toHaveBeenCalledWith( - "/findings?filter[scan]=scan-1&filter[inserted_at]=2026-01-01&filter[status__in]=FAIL", + "/findings?filter[scan__in]=scan-1&filter[inserted_at]=2026-01-01&filter[status__in]=FAIL", ); }); diff --git a/ui/components/scans/table/scan-jobs-row-actions.tsx b/ui/components/scans/table/scan-jobs-row-actions.tsx index 66df8ef7ac..15d9bf0085 100644 --- a/ui/components/scans/table/scan-jobs-row-actions.tsx +++ b/ui/components/scans/table/scan-jobs-row-actions.tsx @@ -93,7 +93,7 @@ export function ScanJobsRowActions({ const openFindings = () => { if (!isCompleted || !scanDate) return; router.push( - `/findings?filter[scan]=${scan.id}&filter[inserted_at]=${scanDate}&filter[status__in]=FAIL`, + `/findings?filter[scan__in]=${scan.id}&filter[inserted_at]=${scanDate}&filter[status__in]=FAIL`, ); };