ShivamSharma43 opened a new pull request, #9390: URL: https://github.com/apache/devlake/pull/9390
### Summary The Opsgenie `convertIncidents` subtask converted closed incidents to `status = OTHER` with no `resolution_date` or `lead_time_minutes`. Opsgenie incidents are `open`, `resolved` or `closed`. `getStatus` mapped `closed` to `ticket.OTHER`, and `getTimes` only filled the resolution date and lead time for `resolved`. A closed incident is finished just like a resolved one, but in `issues` it looked neither open nor done. Metrics that use the resolution date, such as DORA's failed deployment recovery time, left closed incidents out. Details in #9388. Changes: - `tasks/incidents_converter.go`: `getStatus` returns `DONE` for `closed` as well as `resolved`. `getTimes` sets `resolution_date` and `lead_time_minutes` for both, from `updatedAt`, the same way it already did for resolved incidents. `original_status` still holds `closed`. - `tasks/incidents_converter_test.go` (new): checks the status for open, resolved and closed incidents, and checks that resolved and closed incidents get a resolution date and lead time while open ones don't. With the old code, the `closed` cases fail (`expected: "DONE"`, `actual: "OTHER"`). The e2e fixture has only open and resolved incidents, so its snapshots don't change. ### Does this close any open issues? Fixes #9388 ### Screenshots N/A ### Other Information - `go test ./plugins/opsgenie/tasks/`: pass. - `go vet ./plugins/opsgenie/...`, `gofmt` and `golangci-lint run ./plugins/opsgenie/...`: clean. I didn't run the opsgenie e2e tests locally (they need `E2E_DB_URL`); their fixture has no closed incident. - No open PR or issue touches the Opsgenie incident converter. - Suggested label: `pr-type/bug-fix`. - AI assistance disclosure: this change was prepared with the help of Claude Code (Claude Opus 5.5), and I reviewed the diff. The commit carries a `Generated-by:` trailer per the ASF generative tooling guidance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
