Skip to content

[Bug][incident.io] Status categories declined, merged and canceled are mapped to IN_PROGRESS #9374

Open

Description

@ShivamSharma43

Search before asking

  • I had searched in the issues 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):

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?

  • Yes I am willing to submit a PR!

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions