Quantcast
Viewing all articles
Browse latest Browse all 14708

Re: Timestamp on Comments in Defect module

Hello,

 

You can check this below function to see if it helps.

 

Function Defects_ActionCanExecute(ActionName) On Error Resume Next Defects_ActionCanExecute = Project_DefaultRes If ActionName="BugAddDevCommentsAction1" then

Dim DescriptionBefore Dim ServerTime Dim UserStr Dim UserID Dim UserInfo Dim LineStr Dim tempArr

   DescriptionBefore = Bug_Fields("BG_DEV_COMMENTS").Value    if Len(DescriptionBefore) = 0 then       DescriptionBefore = "<html><body>"    else        DescriptionBefore = Left(DescriptionBefore, Len(DescriptionBefore)-Len("</body></html>"))    end if

   ' Get User full name    UserStr = User.FullName    If Trim(UserStr) <> "" then       ' Modify the user full name       tempArr = Split(UserStr, ",")       UserStr = Trim(tempArr(1) & " " & tempArr(0))       Erase tempArr    End If

   ' Assign the user ID    UserID = User.UserName

   ' Assign user login ID    UserID = "&lt;" + User.UserName + "&gt;"

   ' Assign QC server time    ServerTime = CStr(TDConnection.ServerTime)

   ' Start R&D comments    LineStr = "<font color=#000080><b>" + "______________________________________________" + "</b></font>"    UserInfo = "<font color=#000080><b>" + UserStr + " " + UserID + ", " + "" + ServerTime + "" + ": " + "</b></font>"    If (DescriptionBefore <> "<html><body>") Then        DescriptionBefore = DescriptionBefore + "<br>" + LineStr + "<br>" + UserInfo    Else        DescriptionBefore = DescriptionBefore + UserInfo    End If

   'End R&D Comments    Bug_Fields("BG_DEV_COMMENTS").Value = DescriptionBefore + "<font color=#000000> </font>" + "</body></html>"    Defects_ActionCanExecute = False

End If On Error GoTo 0 End Function


Viewing all articles
Browse latest Browse all 14708

Trending Articles