• 实现双 review at 2011年04月29日

    Function Defect_Validation(actionname, actiontype) ' actionname As String ' actiontype As Long ' Defect_Validation As String ' action is Review ' record type name is Defect REM Return a non-empty string explaining why the action REM cannot commit with the current values. REM Or, if it is valid, return an empty string value. REM Example: REM Dim value_info REM Set value_info = GetFieldValue("some field") REM If Len(value_info.GetValue()) < 10 Then REM Defect_Validation = "Must be at least 10 chars long" REM End If Dim user Dim strArray Dim isReviewer Set session = GetSession() user = Session.GetUserLoginName strArray = GetFieldValue("Reviewer").GetValueAsList isReviewer = 0 For i=0 To UBound(strArray) If strArray(i)=user Then isReviewer = 1 End If Next

    If isReviewer = 1 Then if g_reviewer.nohave(user) g_reviewer.add(user)

    If g_reviewer == strArray Then Defect_Validation = "" g_reiewer.clear(); ELSE Defect_Validation = "你 Reivew 完成,等待下一个 Review" End If

    Else Defect_Validation = "您并不是该活动的 Reviewer." End If End Function