<QC/ALM Support Tip> Creating a "counter" in ALM
Below you can find a simple example of creating a "counter" in ALM11.x. This can be used to track how many times a particular field has been changed to a certain value. In the below sample we count how many times the status of a defect has been changed to "Reopen". The steps are:
1. Login to the ALM project and go to Tools - Customize
2. Select "Project Entities" and navigate to "Defect"
3. Create a new UDF (BG_USER_01) and make sure it is of type "Number"
4. Open the Workflow script editor and add the following code in Defects module script under Bug_FieldCanChange function:
Function Bug_FieldCanChange(FieldName, NewValue)
On Error Resume Next
if FieldName = Bug_Fields.Field("BG_STATUS").FieldName then
if NewValue = "Reopen" then
Bug_Fields.Field("BG_USER_01").Value + 1
Bug_FieldCanChange = DefaultRes
On Error GoTo 0
5. Save the changes and return to the project
Of course the above code can be modified in order to meet your business needs.
Note: This information can be found in http://support.openview.hp.com/selfsolve/document/KM00681181