-
Notifications
You must be signed in to change notification settings - Fork 95
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
feat: 添加ITSM上下文配置功能 #1452
feat: 添加ITSM上下文配置功能 #1452
Conversation
common/utils.py
Outdated
receiver_type = "list" | ||
if isinstance(receivers, str): | ||
receiver_type = "str" | ||
receivers = receivers.strip().split(",") | ||
|
||
receivers = [i for i in receivers if i not in settings.NOTICE_IGNORE_LIST] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notice_receiver_filter(receivers):此方法建议转到 meta 实现,主要考虑可以优化 utils 与 ContextService 的调用依赖,最好是:utils 是基础,由 ContextService 调用 utils
# Conflicts: # itsm/component/bkchat/utils.py
# 接收人过滤 | ||
receivers = notice_receiver_filter(receivers) | ||
receivers = context_service.notice_receiver_filter(receivers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议新增【NoticeFilterService】,由此服务实现 notice_receiver_filter的功能,调用层只需要访问 NoticeFilterService 即可,不需要直接调用context_service
return [] | ||
|
||
@staticmethod | ||
def notice_receiver_filter(receivers): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此实现与 ContextService 职责无关,与上个评论一样,建议独立处理
ticket.create_moa_ticket(state_id) | ||
|
||
# 如果service_id不在service_approval_blacklist中,则创建moa单据 | ||
service_approval_blacklist = context_service.get_context_value_list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同样由 notice filter service 处理
No description provided.