Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dtable_events/dtable_io/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,8 @@ def _format_array_item_value(item, email2nickname, array_type, array_data):
return _format_number_display_string(item_value, array_data)
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))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Warning] 缺少协作人导出回归测试

Why this matters:
这里修复了链接公式数组的协作人显示逻辑,但本 PR 未新增覆盖该分支的测试。后续调整 _extract_display_value、用户映射或未知用户兜底时,Excel 很容易再次导出 ID 而不被发现。

Suggested fix: 增加导出单测,覆盖协作人数组中命中映射、字典 display_value 以及未命中映射三种输入,并断言工作表写入预期昵称/兜底值。

if array_type in (ColumnTypes.CTIME, ColumnTypes.MTIME):
return convert_time_to_utc_str(cell_data2str(item_value))
if array_type == ColumnTypes.DATE:
Expand Down
Loading