Highlighted
Absent Member.
Absent Member.
1478 views

Quality Center Defect Module

Jump to solution
I have a defect field named ' Root Cause' and another default field named 'Status'.

Now I want the 'Root Cause' field to be mandatory when the staus changes to 'Closed' ( the motive here being that once the defect is fixed, the root cause too should be documented for future reference). How do I do it>?
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Quality Center Defect Module

Jump to solution
Login to the project and access the customize window. Click on Set Up Workflow and select Script editor.

In the script editor, under the Defects module script, you need to add a function.

Now, there are different ways of doing this but you could try this one:

Sub Defects_Bug_FieldChange(FieldName)

On Error Resume Next
If FieldName= "BG_STATUS" and _
Bug_Fields("BG_STATUS").value = "Closed" then
Bug_Fields("BG_USER44").IsRequired=True
End If
PrintError "Defects_Bug_FieldChange"
On Error GoTo 0

End Sub

*** Note: BG_USER44 should be the real field name for Root Cause. ****

Also, I suggest you read the online help within the script editor. There are more functionsthat you can check there with examples.

Hope this helps.

View solution in original post

1 Reply
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Quality Center Defect Module

Jump to solution
Login to the project and access the customize window. Click on Set Up Workflow and select Script editor.

In the script editor, under the Defects module script, you need to add a function.

Now, there are different ways of doing this but you could try this one:

Sub Defects_Bug_FieldChange(FieldName)

On Error Resume Next
If FieldName= "BG_STATUS" and _
Bug_Fields("BG_STATUS").value = "Closed" then
Bug_Fields("BG_USER44").IsRequired=True
End If
PrintError "Defects_Bug_FieldChange"
On Error GoTo 0

End Sub

*** Note: BG_USER44 should be the real field name for Root Cause. ****

Also, I suggest you read the online help within the script editor. There are more functionsthat you can check there with examples.

Hope this helps.

View solution in original post

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.