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

v1.0.13后台强制修改状态为结束状态,工单状态还是进行中 #250

Closed
zhy-666 opened this issue Apr 14, 2021 · 2 comments
Closed

Comments

@zhy-666
Copy link

zhy-666 commented Apr 14, 2021

ISSUE TEMPLATE

使用的版本: v1.0.13

问题详细描述: 后台强制修改状态为———>结束状态,工单状态还是进行中

是否查看了系统日志(默认在启动用户家目录下loonflow.log):

是否搜索过历史issue:搜索过

做过哪些尝试: 尝试修改了service/ticket/ticket_base_service.py文件中,update_ticket_state方法, ticket_obj.save()之前加入下面两行代码。

  # 如果目标状态是结束状态,工单进行状态修改为已关闭
              if state_obj.type_id == 2:
                  ticket_obj.act_state_id = 5
@blackholll
Copy link
Owner

blackholll commented Apr 14, 2021

问题不大, 我这边记录下,等下个fix版本一起修复下。 你也可以提交pr,帮助完善loonflow。 提交pr的方式见:#252

另外,这段修改还可以稍微优化下:

if state_obj.type_id == constant_service_ins.STATE_TYPE_END:
    ticket_obj.act_state_id = constant_service_ins.TICKET_ACT_STATE_CLOSED
if state_obj.type_id == constant_service_ins.STATE_TYPE_START:
    ticket_obj.act_state_id = constant_service_ins.TICKET_ACT_STATE_DRAFT

@blackholll
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants