Conversation
seafile-dev
reviewed
Sep 17, 2026
seafile-dev
left a comment
There was a problem hiding this comment.
Verdict: Comment
Warnings:
- 缺少链接公式数组协作人导出的回归测试(见行内评论)。
Suggested fix: 为已命中和未命中 nickname 映射的协作人数组补充导出断言,确保 Excel 中输出昵称且不会回退为用户 ID。
| if array_type in (ColumnTypes.CREATOR, ColumnTypes.LAST_MODIFIER): | ||
| return email2nickname.get(cell_data2str(item_value), '') | ||
| if array_type == ColumnTypes.COLLABORATOR: | ||
| return email2nickname.get(cell_data2str(item_value), cell_data2str(item_value)) |
There was a problem hiding this comment.
[Warning] 缺少协作人导出回归测试
Why this matters:
这里修复了链接公式数组的协作人显示逻辑,但本 PR 未新增覆盖该分支的测试。后续调整 _extract_display_value、用户映射或未知用户兜底时,Excel 很容易再次导出 ID 而不被发现。
Suggested fix: 增加导出单测,覆盖协作人数组中命中映射、字典 display_value 以及未命中映射三种输入,并断言工作表写入预期昵称/兜底值。
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.
No description provided.