Skip to content

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

Closed

Description

@ShivamSharma43

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

The Zentao bug converter (plugins/zentao/tasks/bug_convertor.go) sets the domain issues.severity like this:

Severity: string(rune(toolEntity.Severity)),

toolEntity.Severity is the numeric Zentao severity (1 to 4). string(rune(3)) is the control character U+0003, not "3". Every Zentao bug ends up with an unreadable control character in issues.severity, so it can't be shown or filtered on. The e2e snapshots issues_bug.csv and issues_bug_for_due_date.csv contain raw \x03 bytes in the severity column. The tool table _tool_zentao_bugs.csv has severity = 3 for the same rows.

What do you expect to happen

issues.severity should hold the decimal value ("3"), the same way priority is built from pri with getPriority (fmt.Sprintf("%d", pri)).

How to reproduce

Collect a Zentao product with bugs, then run SELECT HEX(severity) FROM issues WHERE id LIKE 'zentao:ZentaoBug:%'. It returns 03 instead of 33.

Anything else

Proposed fix (I have a PR ready): convert with strconv.Itoa through a small getSeverity helper next to getPriority, add a unit test, and replace the \x03 bytes in the two e2e snapshots with 3.

Version

main

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added a commit that references this issue on Nov 12, 2026
    fdca896
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

    ⌂ Proxy