[QualityCenter]设置工作流脚本-缺陷字段值发生变化时的处理
2016-04-21 10:45
309 查看
需求:缺陷状态发生不同变化时,系统会的自动处理一些字段值的变化
在脚本编辑器找到Defects_Bug_FieldChange函数,然后填写以下代码:
Sub Defects_Bug_FieldChange(FieldName)
’已打回状态时,自动弹出要求填写注释,并将“分配给”的值置为“检查者”的值
If Bug_Fields("BG_USER_06").IsModified and _
Bug_Fields("BG_USER_06").Value = "3.已打回" then
msgbox "请在注释处标明原因!"
Bug_Fields("BG_RESPONSIBLE").Value = Bug_Fields("BG_DETECTED_BY").Value
’待沟通状态时,自动弹出要求选择下一环节的负责人
ElseIf Bug_Fields("BG_USER_06").IsModified and _
not Bug_Fields("BG_RESPONSIBLE").IsModified and _
Bug_Fields("BG_USER_06").Value = "5.待沟通" then
msgbox "请选择下一环节负责人!"
Bug_Fields("BG_USER_07").IsRequired=true
’已关闭状态时,要求填写关闭版本号,轮次号等,并自动填写关闭日期和计算缺陷处理时间
ElseIf Bug_Fields("BG_USER_06").IsModified and _
Bug_Fields("BG_USER_06").Value = "6.已关闭" then
Bug_Fields("BG_CLOSING_VERSION").IsRequired=true
Bug_Fields("BG_USER_12").IsRequired=true
Bug_Fields("BG_USER_01").IsRequired=true
Bug_Fields("BG_USER_07").IsRequired=true
Bug_Fields("BG_CLOSING_DATE").Value=Date()
Bug_Fields("BG_USER_16").Value= DateDiff("d",Bug_Fields("BG_DETECTION_DATE").Value,Date())
End if
End Sub
以上只是列举其中一些例子和用法, 不详细列举所有用法,希望大家能够举一反三。
在脚本编辑器找到Defects_Bug_FieldChange函数,然后填写以下代码:
Sub Defects_Bug_FieldChange(FieldName)
’已打回状态时,自动弹出要求填写注释,并将“分配给”的值置为“检查者”的值
If Bug_Fields("BG_USER_06").IsModified and _
Bug_Fields("BG_USER_06").Value = "3.已打回" then
msgbox "请在注释处标明原因!"
Bug_Fields("BG_RESPONSIBLE").Value = Bug_Fields("BG_DETECTED_BY").Value
’待沟通状态时,自动弹出要求选择下一环节的负责人
ElseIf Bug_Fields("BG_USER_06").IsModified and _
not Bug_Fields("BG_RESPONSIBLE").IsModified and _
Bug_Fields("BG_USER_06").Value = "5.待沟通" then
msgbox "请选择下一环节负责人!"
Bug_Fields("BG_USER_07").IsRequired=true
’已关闭状态时,要求填写关闭版本号,轮次号等,并自动填写关闭日期和计算缺陷处理时间
ElseIf Bug_Fields("BG_USER_06").IsModified and _
Bug_Fields("BG_USER_06").Value = "6.已关闭" then
Bug_Fields("BG_CLOSING_VERSION").IsRequired=true
Bug_Fields("BG_USER_12").IsRequired=true
Bug_Fields("BG_USER_01").IsRequired=true
Bug_Fields("BG_USER_07").IsRequired=true
Bug_Fields("BG_CLOSING_DATE").Value=Date()
Bug_Fields("BG_USER_16").Value= DateDiff("d",Bug_Fields("BG_DETECTION_DATE").Value,Date())
End if
End Sub
以上只是列举其中一些例子和用法, 不详细列举所有用法,希望大家能够举一反三。
相关文章推荐
- java mock
- chrome disable-web-security 关闭安全策略 解决跨域
- iOS小Tip之查看FPS
- Selenium Firefox Webdriver 无图模式
- php某个文件夹查找文件
- C#基础知识之构造函数Constructor
- selector使用时遇到的问题
- php从文件中查找内容
- English - allow to do 与 allow doing 的区别
- C++第4次上机实验-利用循环求和
- 网络:NSURLSession 使用 HTTPS
- 22. Generate Parentheses
- java西天取经之路(一)Servlet技术学习总结
- ios 3D Touch功能的实现
- 博客已转移
- IOS-Coredata 核心数据库的基础使用
- POJ 3076 SUKODU [Dangcing Links DLX精准覆盖]
- HTTPS工作原理
- float的精度,3个小数相加后精度丢失--小数比较使用bccomp()方法
- spring-mvc不拦截静态资源的配置