Skip to content

fix: populate date completed for failed single-repository reports#273

Open
rhartuv wants to merge 2 commits into
RHEcosystemAppEng:mainfrom
rhartuv:fix/completed-in-single
Open

fix: populate date completed for failed single-repository reports#273
rhartuv wants to merge 2 commits into
RHEcosystemAppEng:mainfrom
rhartuv:fix/completed-in-single

Conversation

@rhartuv

@rhartuv rhartuv commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Details

When a report failed via updateWithError / POST /api/v1/reports/failed, the UI showed Finding Failed but Date Completed was blank because report.completedAt only came from input.scan.completed_at, which was never set on failure (SBOM product Date Completed already fell back to error.at).

This change:

  1. Sets input.scan.completed_at to the same instant as error.at when marking failed/expired (if not already set).
  2. Maps Report.completedAt from scan.completed_at, or from getReportCompletionTime only when an error is present (so in-progress rows do not incorrectly show Date Requested as Date Completed).
  3. Unsets completed_at on retry so a retried analysis is not treated as completed.
  4. Tightens the completed status filter to require no error field.

(Overview metrics are unchanged: they already exclude documents with an error field.)

Jira

Before:
image
After:
image

@rhartuv rhartuv self-assigned this Jul 19, 2026
@rhartuv rhartuv added the chore label Jul 19, 2026
@vbelouso

vbelouso commented Jul 19, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@rhartuv rhartuv changed the title fix: add date completed on failed status in single repository tab fix: populate date completed for failed single-repository reports Jul 19, 2026
@rhartuv
rhartuv marked this pull request as ready for review July 19, 2026 08:15
zvigrinberg
zvigrinberg previously approved these changes Jul 19, 2026

@zvigrinberg zvigrinberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rhartuv LGTM Approved.

@zvigrinberg

Copy link
Copy Markdown
Collaborator

@rhartuv Kindly rebase ,solve conflicts and retest before merging.
Thank you.

@rhartuv
rhartuv requested a review from zvigrinberg July 19, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants