51Testing软件测试论坛

标题: 教你如何跟踪缺陷生存状态 [打印本页]

作者: joshfang    时间: 2008-4-28 10:59
标题: 教你如何跟踪缺陷生存状态
  1. Function Bug_CanPost
  2. 'Enter code to be executed before current bug is posted
  3. 'if you want to abort posting, use Bug_CanPost = False

  4. On Error Resume Next

  5. Dim detected_date
  6. Dim closing_date

  7. 'Determine if "Defect Status" is closed
  8. If fields.Field("BG_USER_05").Value = "Closed" Then
  9. ' Format dates
  10. ' detected_date = DateValue(fields.Field("BG_DETECTED_DATE").Value)
  11. ' closing_date = DateValue(fields.Field("BG_CLOSING_DATE").Value)

  12. detected_date = fields.Field("BG_DETECTED_DATE").Value
  13. closing_date = fields.Field("BG_CLOSING_DATE").Value

  14. ' Determine the number of week days between defect "Detected on Date" and "Closing Date"
  15. fields.Field("BG_USER_08").Value = DateDiff("h", detected_date, closing_date)
  16. End If

  17. End Function
复制代码





欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2