bujjibabukatta opened a new pull request, #8919: URL: https://github.com/apache/devlake/pull/8919
## 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
