You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Zentao] Bug severity is converted to a control character instead of its number #9380
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.
Activity
fix(zentao): store bug severity as its decimal string (apache#9382)