Display defect comments in reverse order
Question ID: 108925

Hello. We would like to have our defect comments displayed in reverse order so that the most recent comment will be displayed at the top. Can you help me with this? Thanks!

Marked as spam
Posted by (Questions: 239, Answers: 31)
Asked on April 5, 2019 6:11 pm
Answers (1)
Private answer

Hello. I will be glad to assist you with this request. If you have access to the 'Script Editor' within ALM Customization, you will need to perform the following steps and enter the workflow script below. In ALM, click the 'Tools..' button (Gear cog) in the upper-right corner, then select 'Customize...' from the menu that displays. In 'Project Customization', click 'Workflow' in the left column. Locate and click the 'Script Editor' link to open the 'Script Editor' (You may need to resize the window to make it larger). With the 'Common Script' module expanded, enter the following script into the ActionCanExecute Function after the line ' ActionCanExecute = DefaultRes', and before the line 'End Function'. After you have placed the script within the function, click the 'Save' button and close the 'Script Editor'. Next, click the 'Return button, then click the 'Major Change' radio button and click 'OK'. Once you are back in the 'Defects' module, test to see if the comments are being added in reverse order. If you have any questions or concerns, or need any assistance with this workflow, please let me know.

If ActionName=''BugAddDevCommentsAction1'' Then
dim DescriptionBefore
dim ServerTime
dim UserStr

DescriptionBefore = Bug_Fields(''BG_DEV_COMMENTS'').Value

If Len(DescriptionBefore) <> 0 then
DescriptionBefore = Replace(DescriptionBefore, '''', '''')
DescriptionBefore = Replace(DescriptionBefore, '''', '''')
end if

UserStr = User.FullName
If Trim(UserStr) = '''' then
UserStr = User.UserName

UserStr = UserStr + '' <'' + User.UserName + ''>''
End if

'ServerTime = CStr(TDConnection.ServerTime)

DescriptionBefore = '''' + UserStr + '', '' + CStr(Date()) + '': '' + ''

'' + DescriptionBefore + ''''

Bug_Fields(''BG_DEV_COMMENTS'').Value = DescriptionBefore
ActionCanExecute = False
End If

Marked as spam
Posted by (Questions: 2, Answers: 300)
Answered on April 5, 2019 6:12 pm
That did the trick! Thank you for your help!
( at April 5, 2019 6:13 pm)

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top