Skip to content

fix(webhook): set resolution_date and lead_time_minutes on incident c…#8919

Merged
klesh merged 1 commit into
apache:mainfrom
bujjibabukatta:fix/#8906
Jun 12, 2026
Merged

fix(webhook): set resolution_date and lead_time_minutes on incident c…#8919
klesh merged 1 commit into
apache:mainfrom
bujjibabukatta:fix/#8906

Conversation

@bujjibabukatta

Copy link
Copy Markdown
Contributor

Summary

Fixes #8906

What happened

When closing an incident via the webhook API (POST /plugins/webhook/:connectionId/issue/:issueKey/close), the resolution_date field was never set on either the issues or incidents table. The DORA FDRT (Failed Deployment Recovery Time) metric is calculated from incidents.resolution_date, so incidents closed this way never appeared in the DORA dashboard.

Root Cause

In backend/plugins/webhook/api/issues.go, the closeIssue function set Status to DONE and cleared OriginalStatus for both the issue and incident records, but never set ResolutionDate or recalculated LeadTimeMinutes.

Changes

backend/plugins/webhook/api/issues.go

  • Set ResolutionDate to time.Now() if not already set when closing an issue
  • Recalculate LeadTimeMinutes from CreatedDate to ResolutionDate if not already set when closing an issue
  • Same two changes applied to the incident record

@bujjibabukatta

Copy link
Copy Markdown
Contributor Author

Hi @klesh could you please approve pull request?

@klesh klesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@klesh klesh merged commit 65cbe82 into apache:main Jun 12, 2026
10 checks passed
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][Webhook] Incident closing via webhook does not set resolution_date

2 participants