Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复快速审批单据字段顺序与实际不一致的问题 #1260

Merged
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
11 changes: 9 additions & 2 deletions itsm/component/bkchat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ def build_bkchat_summary(ticket):

# 添加「提单信息」
content = "{}\n **--- 单据基本信息 ---**".format(content)
state_fields = ticket.get_state_fields(ticket.first_state_id, need_serialize=False)
state_fields = ticket.get_state_fields(
ticket.first_state_id, need_serialize=False
).exclude(type__in=["TABLE", "CUSTOMTABLE", "FILE"])
field_order = ticket.state(ticket.first_state_id)["fields"]
fields_map = {f.workflow_field_id: f for f in state_fields}
# 隐藏字段过滤
for f in state_fields.exclude(type__in=["TABLE", "CUSTOMTABLE", "FILE"]):
for index in field_order:
f = fields_map.get(index, None)
if f is None:
continue
if f.show_type == SHOW_BY_CONDITION:
key_value = {
"params_%s"
Expand Down
Loading