Skip to content

fix(zentao): store bug severity as its decimal string - #9382

Open
ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/zentao-bug-severity
Open

ShivamSharma43 wants to merge 1 commit into
apache:mainfrom
ShivamSharma43:fix/zentao-bug-severity

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

The Zentao bug converter set issues.severity with string(rune(toolEntity.Severity)). Zentao severity is a number from 1 to 4, and string(rune(3)) is the control character U+0003, not "3". Every Zentao bug got an unreadable control character as its severity. The e2e snapshots even had raw \x03 bytes in that column, while _tool_zentao_bugs.csv has severity = 3 for the same rows.

Changes:

  • tasks/shared.go: new getSeverity helper (strconv.Itoa), next to getPriority, which already formats pri as a decimal string.
  • tasks/bug_convertor.go: uses getSeverity.
  • tasks/shared_test.go: unit test for getSeverity.
  • e2e/snapshot_tables/issues_bug.csv, issues_bug_for_due_date.csv: the \x03 bytes in the severity column are now 3. No other column changes. (The diff renders the control character as an invisible change.)

Stories and tasks don't set severity, so their snapshots are unchanged. No migration: rows are rewritten on the next conversion.

Does this close any open issues?

Closes #9380

Screenshots

N/A

Other Information

  • go test ./plugins/zentao/tasks/: pass. The e2e tests need E2E_DB_URL, which I didn't run locally. The snapshots match the tool-layer severity = 3 of the same bugs.
  • go vet, gofmt and golangci-lint run ./plugins/zentao/...: clean.
  • The only open PR touching the zentao plugin is feat(dora): per-project DORA isolation for Jira boards shared by several projects #9216, which edits board_issues_*.csv only. This PR doesn't touch those files.
  • 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

The bug converter set issues.severity with string(rune(severity)),
which turns severity 3 into the control character U+0003 instead of
"3". Format it with strconv.Itoa through a getSeverity helper next to
getPriority, and fix the \x03 bytes in the e2e snapshots.

Closes apache#9380

Generated-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Zentao] Bug severity is converted to a control character instead of its number

2 participants