zoukankan      html  css  js  c++  java
  • [QualityCenter]设置工作流脚本-缺陷字段值发生变化时的处理

    需求:缺陷状态发生不同变化时,系统会的自动处理一些字段值的变化

    在脚本编辑器找到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

    以上只是列举其中一些例子和用法, 不详细列举所有用法,希望大家能够举一反三。

  • 相关阅读:
    安装完openfire之后打不开的解决方案
    iOS中动画的简单使用
    iOS中的多线程及GCD
    iOS 架构模式-MVVM
    iOS
    iOS 下拉刷新 上拉加载实现原理
    iOS
    iOS 中的XML解析代码(SAX)
    iOS
    iOS中的网络请求 和 网络监测
  • 原文地址:https://www.cnblogs.com/whylaughing/p/5416029.html
Copyright © 2011-2022 走看看