ShivamSharma43 opened a new pull request, #9404:
URL: https://github.com/apache/devlake/pull/9404

   ### Summary
   
   The Rootly `convertIncidents` subtask maps the status `triage` to `TODO`, 
but Rootly never returns `triage`. Its API calls that status `in_triage`.
   
   The incident `status` enum in Rootly's OpenAPI spec 
(https://rootly-heroku.s3.amazonaws.com/swagger/v1/swagger.json) is `in_triage, 
started, detected, acknowledged, mitigated, resolved, closed, cancelled, 
scheduled, in_progress, completed`. There is no `triage`. So `mapStatus` has no 
case for real in-triage incidents. They fall through to the default branch: 
`issues.status` becomes `IN_PROGRESS` instead of `TODO`, and the converter logs 
`unknown rootly incident status: in_triage` once for every such incident.
   
   Changes:
   
   - `tasks/incidents_converter.go`: `mapStatus` matches `in_triage` instead of 
`triage`.
   - `tasks/incidents_converter_test.go`: the `TestMapStatus` case uses 
`in_triage`. With the old code it fails (`expected: "TODO"`, `actual: 
"IN_PROGRESS"`).
   - `e2e/raw_tables/_raw_rootly_incidents.csv` and the 
`_tool_rootly_incidents.csv` / `issues.csv` snapshots: incident `inc_01` now 
has the real status value `in_triage` instead of `triage`. Its domain status 
stays `TODO`. Only that one value changes.
   
   No migration: rows are rewritten on the next conversion.
   
   ### Does this close any open issues?
   
   No issue is open for this. The bug is described above.
   
   ### Screenshots
   
   N/A
   
   ### Other Information
   
   - `go test ./plugins/rootly/tasks/`: pass. The e2e test needs `E2E_DB_URL`, 
which I didn't run locally. The fixture change only swaps the status string in 
the raw row and the two snapshots that copy it.
   - `go vet ./plugins/rootly/...` and `gofmt`: clean.
   - No open PR touches the rootly plugin.
   - Rootly also has `detected`, `acknowledged`, `scheduled` and `in_progress`, 
which still fall back to `IN_PROGRESS` with a warning. I left them out to keep 
this PR small. I can map them in a follow-up if you want.
   - Suggested label: `pr-type/bug-fix`.
   - AI assistance disclosure: I prepared this change with Claude Code (Claude 
Opus 5.5), reviewed the diff and ran the tests. The commit has a 
`Generated-by:` trailer, following 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]

Reply via email to