Repository navigation
fix(zentao): store bug severity as its decimal string - #9382
Open
ShivamSharma43 wants to merge 1 commit into
Open
ShivamSharma43 wants to merge 1 commit into
ShivamSharma43 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Zentao bug converter set
issues.severitywithstring(rune(toolEntity.Severity)). Zentao severity is a number from 1 to 4, andstring(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\x03bytes in that column, while_tool_zentao_bugs.csvhasseverity = 3for the same rows.Changes:
tasks/shared.go: newgetSeverityhelper (strconv.Itoa), next togetPriority, which already formatsprias a decimal string.tasks/bug_convertor.go: usesgetSeverity.tasks/shared_test.go: unit test forgetSeverity.e2e/snapshot_tables/issues_bug.csv,issues_bug_for_due_date.csv: the\x03bytes in the severity column are now3. 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 needE2E_DB_URL, which I didn't run locally. The snapshots match the tool-layerseverity = 3of the same bugs.go vet,gofmtandgolangci-lint run ./plugins/zentao/...: clean.board_issues_*.csvonly. This PR doesn't touch those files.pr-type/bug-fix.Generated-by:trailer per the ASF generative tooling guidance.🤖 Generated with Claude Code