-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
添加手动执行功能 #178
添加手动执行功能 #178
Conversation
你好!感谢你反馈的问题/bug,但是你的描述好像是空的,我们需要你完整的信息,这样才能帮你解决问题 如果不知道怎么写,在新建issue的时候有若干个模板可供选择,祝好! |
重新提交的 手动执行上线语句的pr |
Codecov Report
@@ Coverage Diff @@
## master #178 +/- ##
==========================================
+ Coverage 73.95% 74.18% +0.23%
==========================================
Files 62 62
Lines 6727 6760 +33
==========================================
+ Hits 4975 5015 +40
+ Misses 1752 1745 -7
Continue to review full report at Codecov.
|
@LeoQuote 增加手工执行结束状态的话,国际化文件需要增加些什么吗 |
sql/sql_workflow.py
Outdated
context = {'errMsg': '你无权操作当前工单!'} | ||
return render(request, 'error.html', context) | ||
|
||
# 将流程状态修改为执行中 |
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.
应该是手工执行完成?
sql/sql_workflow.py
Outdated
audit_id = Audit.detail_by_workflow_id(workflow_id=workflow_id, | ||
workflow_type=WorkflowDict.workflow_type['sqlreview']).audit_id | ||
Audit.add_log(audit_id=audit_id, | ||
operation_type=5, |
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.
状态和类型可能标记执行结束会更合理,这里应该是手工执行完成后回过来手工做个流程确认吧
sql/sql_workflow.py
Outdated
Audit.add_log(audit_id=audit_id, | ||
operation_type=5, | ||
operation_type_desc='执行工单', | ||
operation_info="人工操作执行", |
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.
操作信息也可以体现这一点
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.
https://github.com/hhyo/Archery/tree/master/sql/locale/zh_Hans/LC_MESSAGES 这个目录下的两个本地化文件需要添加一下新工单状态的翻译,照着添加就可以了。 不会的话可以我来添加,我看看我能不能直接提交 |
第一次用这个git 这个 你们是怎么样合并我这和分支的呢, 我看上面都是好多都是红色XX |
有红色的叉叉是因为单元测试覆盖率没达要求,最好是你也提供一下单元测试,单元测试统一放在代码所在文件夹的 tests.py里面 |
我仔细看了一下代码, 我发现手动执行和自动执行的逻辑非常相似, 只是少了实际执行工单的那一步, 可不可以考虑只是简单的在execute中加一个参数, 如果这个参数为真就不做实际执行? 这样view的代码也可以复用, 单元测试同样可以复用。 |
按你说的 改了代码了 减少了代码量 复用一个view 来做处理 |
已合并,感谢贡献,后续可以在功能开发前就提交PR,方便及时的进行review和修正 找时间补充一个贡献指南 |
关联issue #117