Outstanding Contributor.
Outstanding Contributor.
163 views

<QC/ALM Support Tip> Creating a "counter" in ALM

Dear Customers,

 

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 =
            Bug_Fields.Field("BG_USER_01").Value + 1
         end if
      end if

   Bug_FieldCanChange = DefaultRes
 On Error GoTo 0
 End Function

 

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

 

Kind regards,

Hristo

 

Labels (1)
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.