-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
修复工单审核不通过依然待审核展示的问题 #2712
base: master
Are you sure you want to change the base?
修复工单审核不通过依然待审核展示的问题 #2712
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2712 +/- ##
=======================================
Coverage 77.11% 77.12%
=======================================
Files 117 117
Lines 16170 16179 +9
=======================================
+ Hits 12470 12478 +8
- Misses 3700 3701 +1 ☔ View full report in Codecov by Sentry. |
pr 来迟了, 先 close 了, 有问题可以在这里讨论, 欢迎提出你的宝贵意见 #2692 |
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.
如果工单是自动审核的,会在上方的 is auto review 逻辑中提前返回,所以你的逻辑需要提前到最前方才可行
可以考虑写成 is autoreview error return
确实有这个问题,修改一下。 |
自动审核不通过的时候,不再走自动审核逻辑 |
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.
这个逻辑写得复杂了, 你就写 if status == workflow_autoreviewwrong, 就自动驳回然后 提前return, 后面的 自动通过逻辑不变即可
直接return的话,如果不记录sql_audit的话,查看工单detail的时候有点问题,而且工单没有日志记录,所以没有直接return,还是记录了audit 和audit_log 。 |
我理解大佬你的意思是直接return 就不用在记录audit 和audit_log 了是么?可能我的理解不对,感谢大佬的指导 |
还是正常记录 audit 的, 只是提前 return, 这样下面的逻辑就不会走了
这样你即使后面写 if audit_setting.auto_pass: 也能正常驳回 你看看这么写是否符合预期 |
辛苦再写一点单元测试, 测试一下自动驳回的工单表现是否正常, 就可以了 |
单元测试不会写,我在我项目部署测试了一下,功能正常 |
fix #2699