|
- Function Bug_CanPost
- 'Enter code to be executed before current bug is posted
- 'if you want to abort posting, use Bug_CanPost = False
- On Error Resume Next
- Dim detected_date
- Dim closing_date
- 'Determine if "Defect Status" is closed
- If fields.Field("BG_USER_05").Value = "Closed" Then
- ' Format dates
- ' detected_date = DateValue(fields.Field("BG_DETECTED_DATE").Value)
- ' closing_date = DateValue(fields.Field("BG_CLOSING_DATE").Value)
- detected_date = fields.Field("BG_DETECTED_DATE").Value
- closing_date = fields.Field("BG_CLOSING_DATE").Value
- ' Determine the number of week days between defect "Detected on Date" and "Closing Date"
- fields.Field("BG_USER_08").Value = DateDiff("h", detected_date, closing_date)
- End If
- End Function
复制代码 |
|