Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
rbloydie Absent Member.
Absent Member.
851 views

QC - Defect Template would like to use only when raising outside of manual run

Hi,

 

I have looked through the forums and found out how to create a defect template. However the problem I have is that I would like to only use this template when raising it outside of execution. What I am finding is that when I raise a defect when using the manual execution option it is overwriting all the normal information that is extracted.

 

Copied below is the current text that I am using

 

Sub Defects_Bug_New
 On Error Resume Next
 Add text to the Description field to guide the user in entering a defect description
 strQ = vbCrLf & " " & vbCrLf
 strTemp="Problem (Clear Decription of Defect):" & strQ & "Steps to Re-produce:" & strQ & _
 "Expected Results:" & strQ & "Actual Result" & strQ & "Workaround if known:" & strQ & _
 "Role:" & strQ & "Is screenshot attached?" & strQ & "Data:" & strQ
 Bug_Fields.Field("BG_DESCRIPTION").Value=_
            "<html><body>" & _
            "<strong><FONT color=#800000><u>Problem (Clear Decription of Defect):</u></FONT></strong> " & _
            "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Steps to Re-produce:</u></FONT></strong> " & _
            "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Expected Results:</u><?/FONT></strong> " & _
            "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Actual Results:</u></FONT></strong> " & _
            "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Workaround if known:</u></FONT></strong> " & _
            "<br></br><br></br>" & _
           "<strong><FONT color=#800000><u>Role:</u></FONT></strong> " & _
            "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Is screenshot attached?:</u></FONT></strong> " & _
           "<br></br><br></br>" & _
            "<strong><FONT color=#800000><u>Data&colon;</u></FONT></strong> " & _
            "<br></br><br></br>" & _
            "</body></html>"
 On Error GoTo 0
End Sub

 

 

 

Thanks

 

 

 

 

 

 

 

0 Likes
3 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: QC - Defect Template would like to use only when raising outside of manual run

You can do this easily by checking the value of the ActiveModule variable. When creating the defect from the Defects module, its value will be "Defects". When doing it from the Manual Runner, it will be "ManualRun". From HP Sprinter it will be empty.
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
rbloydie Absent Member.
Absent Member.

Re: QC - Defect Template would like to use only when raising outside of manual run

Hi thanks for the response, but I do not know this part of QC very well. By any chance can you please tell me where to put this information and what to Add.

 

thanks

0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: QC - Defect Template would like to use only when raising outside of manual run

You could just include the code that you have right now within an if clause:

'Add text to the Description field to guide the user in entering a defect description

If ActiveModule = "Defects" Then
   ...
   ...
End If

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.