ShivamSharma43 opened a new issue, #9374: URL: https://github.com/apache/devlake/issues/9374
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened The incident.io converter maps `incident_status.category` with names the API doesn't send (`plugins/incidentio/tasks/incidents_converter.go`): ```go switch category { case "triage", "declared", "active", "paused", "post-incident": return ticket.IN_PROGRESS, true case "closed", "resolved": return ticket.DONE, true default: return ticket.IN_PROGRESS, false } ``` The incident.io API (`IncidentStatusV2.category` in https://docs.incident.io/api-reference/incidents-v2/list) has these values: `triage`, `declined`, `merged`, `canceled`, `live`, `learning`, `closed`, `paused`. The docs say: "All statuses apart from live (renamed in the app to Active) and learning (renamed in the app to Post-incident) are managed by incident.io and cannot be configured." So `active` and `post-incident` are app display names, and `declared` and `resolved` are not categories. As a result: - `declined`, `merged` and `canceled` incidents fall into the default branch and are stored as `IN_PROGRESS`. They show as open incidents forever. - `live` and `learning` incidents land on `IN_PROGRESS` only through the default branch, and each one logs "unknown incident.io status category". ### What do you expect to happen - `triage`, `live`, `learning` and `paused` map to `IN_PROGRESS`. - `closed`, `declined`, `merged` and `canceled` map to `DONE`, since they are all terminal. This matches the Rootly plugin, which maps `cancelled` to `DONE`. - No warning for documented categories. ### How to reproduce Collect an incident type that has a declined, merged or canceled incident. Its row in `issues` has `status = 'IN_PROGRESS'`, and the converter logs `unknown incident.io status category: declined` (or `live`/`learning` for active incidents). ### Anything else Proposed fix (I have a PR ready): use the API's category names in `mapStatusCategory` and update its unit test. The e2e raw fixture also uses `"category": "active"` on one row; I'd change that to `live`. That row belongs to another incident type, so the snapshots don't change. ### Version main ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
